ceki        2004/11/27 10:50:33

  Modified:    src/java/org/apache/log4j/selector ContextJNDISelector.java
  Log:
  Added comments in response to Jacob Kjome's message of 08:33 AM 11/27/2004.
  
  Revision  Changes    Path
  1.11      +9 -1      
logging-log4j/src/java/org/apache/log4j/selector/ContextJNDISelector.java
  
  Index: ContextJNDISelector.java
  ===================================================================
  RCS file: 
/home/cvs/logging-log4j/src/java/org/apache/log4j/selector/ContextJNDISelector.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ContextJNDISelector.java  15 May 2004 18:22:57 -0000      1.10
  +++ ContextJNDISelector.java  27 Nov 2004 18:50:33 -0000      1.11
  @@ -184,10 +184,18 @@
           // configure log4j internal logging
           IntializationUtil.log4jInternalConfiguration(hierarchy);
   
  -        // Use automatic configration to configure the default hierarchy
  +        // Check if Mrs. Piggy gave us explicit configration directives
  +        // regarding this directory.
           String configResourceStr = JNDIUtil.lookup(ctx, 
JNDI_CONFIGURATION_RESOURCE);
           String configuratorClassName = JNDIUtil.lookup(ctx, 
JNDI_CONFIGURATOR_CLASS);
   
  +        // If no explicit direction were given, then user automatic 
  +        // the default configuration files. Try log4j.xml first and then
  +        // log4j.properties.
  +        // Note that Loader.getResource() method uses the Thread Context
  +        // Classloader first and if that fails,tries "other" classloaders, 
  +        // including the System classloader. This is actually quite wrong as
  +        // only the TCL should be tried.
           if (configResourceStr == null) {
             if (
               Loader.getResource(Constants.DEFAULT_XML_CONFIGURATION_FILE) != 
null) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to