[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/utils ObjectStore.java,1.12,1.13 DB.java,1.18,1
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2004-08-30 00:56:50
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12162/src/net/sourceforge/idrs/utils Modified Files: ObjectStore.java DB.java UserInfo.java Log Message: Added log4j support. cleaned up the logs Index: ObjectStore.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/utils/ObjectStore.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ObjectStore.java 29 Aug 2004 05:01:41 -0000 1.12 --- ObjectStore.java 30 Aug 2004 00:56:08 -0000 1.13 *************** *** 442,446 **** */ public void importDOM(Element root,Object obj,String basePackage) throws Exception { ! System.out.println("Entering importDOM"); Method[] meths = obj.getClass().getMethods(); --- 442,446 ---- */ public void importDOM(Element root,Object obj,String basePackage) throws Exception { ! Method[] meths = obj.getClass().getMethods(); *************** *** 479,483 **** NodeList children = elem.getChildNodes(); if (elem.getAttributes().getLength() == 0 && children.getLength() == 1 && children.item(0).getNodeType() == Node.TEXT_NODE) { ! System.out.println("Seting property : " + name); // convert the name into a java property, setXXXX name = "set" + new String(new char[]{name.toUpperCase().charAt(0)}) + name.substring(1); --- 479,483 ---- NodeList children = elem.getChildNodes(); if (elem.getAttributes().getLength() == 0 && children.getLength() == 1 && children.item(0).getNodeType() == Node.TEXT_NODE) { ! // convert the name into a java property, setXXXX name = "set" + new String(new char[]{name.toUpperCase().charAt(0)}) + name.substring(1); *************** *** 494,498 **** String className = (basePackage != null && basePackage.trim().length() > 0 ? basePackage + "." : "") + name; ! System.out.println("Creating object : " + className); Object newobj = Class.forName(className).newInstance(); --- 494,498 ---- String className = (basePackage != null && basePackage.trim().length() > 0 ? basePackage + "." : "") + name; ! Object newobj = Class.forName(className).newInstance(); Index: DB.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/utils/DB.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** DB.java 29 Aug 2004 05:01:41 -0000 1.18 --- DB.java 30 Aug 2004 00:56:08 -0000 1.19 *************** *** 18,21 **** --- 18,23 ---- import net.sourceforge.idrs.core.report.IDRSHead; import java.io.*; + + import org.apache.log4j.Logger; /** *Class DB *************** *** 27,31 **** --- 29,35 ---- */ + public class DB implements Serializable { + static transient Logger logger = Logger.getLogger(DB.class.getName()); //public fields public static final int SERVER = 1; *************** *** 783,787 **** HashMap caches = null; ! System.out.println("Client Cursor : " + (this.cursur == DB.CLIENT)); if (this.cursur == DB.CLIENT) { caches = ((HashMap) idrs.getSession().getAttribute("IDRS_DB_CACHE")); --- 787,791 ---- HashMap caches = null; ! if (logger.isDebugEnabled()) logger.debug("Client Cursor : " + (this.cursur == DB.CLIENT)); if (this.cursur == DB.CLIENT) { caches = ((HashMap) idrs.getSession().getAttribute("IDRS_DB_CACHE")); *************** *** 791,796 **** } this.wasCached = (caches.get(this.ID) != null); ! System.out.println("Cached : " + this.wasCached); ! System.out.println("Cache : " + caches.get(this.name)); } --- 795,800 ---- } this.wasCached = (caches.get(this.ID) != null); ! logger.debug("Cached : " + this.wasCached); ! logger.debug("Cache : " + caches.get(this.name)); } *************** *** 804,810 **** ! System.out.println("is cached? : " + this.wasCached); if (! this.wasCached || caches.get(this.name) == null) { ! System.out.println("in here"); if (! idrs.isError()) { if (type == METHOD) { --- 808,814 ---- ! logger.debug("is cached? : " + this.wasCached); if (! this.wasCached || caches.get(this.name) == null) { ! if (! idrs.isError()) { if (type == METHOD) { Index: UserInfo.java =================================================================== RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/utils/UserInfo.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UserInfo.java 29 Aug 2004 05:01:41 -0000 1.5 --- UserInfo.java 30 Aug 2004 00:56:08 -0000 1.6 *************** *** 36,40 **** userName=name; userID=id; ! System.out.println("GROUPS: " + groups); StringTokenizer tok = new StringTokenizer(groups,",",false); this.groups = new int[tok.countTokens()]; --- 36,40 ---- userName=name; userID=id; ! StringTokenizer tok = new StringTokenizer(groups,",",false); this.groups = new int[tok.countTokens()]; *************** *** 43,47 **** while (tok.hasMoreTokens()) { this.groups[i++] = Integer.parseInt(tok.nextToken().trim()); ! System.out.println(this.groups[i-1]); } } --- 43,47 ---- while (tok.hasMoreTokens()) { this.groups[i++] = Integer.parseInt(tok.nextToken().trim()); ! } } |