Hello all,
 
I have been doing some research and testing on potential log4j configurations 
to use in our J2EE environment.  We have decided that the best solution that 
fits our environment is a Repository Selector.  We would like to use a JNDI 
selector do to the advantages that JNDI provides.
 
The problem that occurs is with Loggers that are created when JNDI is not 
available.  For example: When a class or instance scoped Logger is declared and 
initialized in a Servlet the selector will attempt to do a JNDI lookup but JNDI 
is not available until the init method is called.  When this happens the 
created logger is forever without a configuration.  EJBs are also afflicted by 
this as well.
 
We could make a standard that all Logger in those classes are initialized when 
JNDI is available but that is not a viable solution.  We use third-party 
libraries that are also afflicted with this problem (Struts framework for 
example through its use of commons logging).
 
I was wondering if anyone has any ideas.  Thanks.
 
Info about our environment:
WebSphere 6.1 on Z/OS
log4j.1.2.15
Repository Selector based on the log4j 1.3alpha design
 
Disclaimer:
I have Ceki Gülcü's log4j manual.  I have also searched the log4j wiki, mail 
list, and many other sources.  I have not found anything.  If I missed the 
solution to this problem I am sorry.
 
 

Reply via email to