[Ejtools-cvs] CVS: libraries/common/src/main/net/sourceforge/ejtools/util JNDI.java,1.2,1.3
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-05-02 07:38:05
|
Update of /cvsroot/ejtools/libraries/common/src/main/net/sourceforge/ejtools/util In directory usw-pr-cvs1:/tmp/cvs-serv7306/common/src/main/net/sourceforge/ejtools/util Modified Files: JNDI.java Log Message: Add log4j statementJavaDoc complete Index: JNDI.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/net/sourceforge/ejtools/util/JNDI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDI.java 30 Apr 2002 21:07:38 -0000 1.2 --- JNDI.java 2 May 2002 07:34:02 -0000 1.3 *************** *** 13,25 **** import javax.naming.Context; /** ! * Description of the Class * * @author letiembl * @created 12 novembre 2001 */ public abstract class JNDI { ! /** Description of the Method */ public static void setJNDIProperties() { --- 13,35 ---- import javax.naming.Context; + import org.apache.log4j.Category; + /** ! * Utility class to access environment properties ! * for JNDI. * * @author letiembl * @created 12 novembre 2001 + * @version $Revision$ */ public abstract class JNDI { ! /** Log4j Logger */ ! static Category logger = Category.getInstance(JNDI.class); ! ! /** ! * Look-up for a file named jndi.properties in the ! * classpath. If found, it is load into the VM environment. ! */ public static void setJNDIProperties() { *************** *** 30,39 **** if (in != null) { ! // Load the jndi properties file Properties props = new Properties(); props.load(in); in.close(); ! System.out.println("Setting System Properties"); // Set up the environment --- 40,51 ---- if (in != null) { ! logger.debug("Found jndi.properties in classpath"); ! ! // Load the jndi.properties file Properties props = new Properties(); props.load(in); in.close(); ! logger.debug("Setting VM environment"); // Set up the environment *************** *** 45,52 **** catch (IOException ioe) { - ioe.printStackTrace(); // Ignore it } } } - --- 57,63 ---- catch (IOException ioe) { // Ignore it + logger.warn("Exception while loading jndi.properties " + ioe.getMessage()); } } } |