Ceki.  You are right here.  The server provides the JMX libraries in a parent 
classloader, as it is the server providing the service.  In order for Log4j to 
work with JMX, they must be in the same classloader.  As such, putting 
log4j.jar in WEB-INF/lib in servers (like Tomcat) which load libraries 
preferentially from the WebappClassLoader will not work.  In this case, the 
default behavior of servers like JBoss and WebLogic is probably preferrable, 
since it won't really matter where log4j.jar is (although one might run into 
some log4j.jar versioning problems, which is the major reason for the servlet 
spec recommended classloading scheme).  Under Tomcat, log4j.jar would need to 
be in common/lib and removed from any webapp's WEB-INF/lib in order for this to 
work.

Jake

Quoting Ceki Gülcü <[EMAIL PROTECTED]>:

> 
> Hello Eduardo,
> 
> We need to be able to name logger repositories, even the default one. That
> much is clear.
> 
> Now, even if each default logger repository per web-application (per
> log4j.jar in WEB-INF/lib) has a name, how can the JMX server access the
> different logger repositories if they are loaded by different class
> loaders, which are potentially invisible to the JMX server?
> 
> Does my question make sense?
> 
> At 06:27 PM 11/24/2003 +0100, Macarron Miegemolle, Eduardo wrote:
> 
> 
> >         Yoav,
> >
> >         We are not using the Repository Selector method to keep different
> >instances of log4j for each application, we use the simpler method of
> >droping log4j.jar on each WEB-INF/lib. So tiding somehow JMX domain to
> >Repository Selector wont work for us. So I think that JMX domain same should
> >be configurable as you have already pointed. In fact, the domain name of the
> >first MBean is provided by application initialitiation code when registers
> >it.
> >
> >         cheers
> >
> >-----Mensaje original-----
> >De: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> >Enviado el: lunes, 24 de noviembre de 2003 18:00
> >Para: Log4J Developers List
> >Asunto: RE: log4j JMX implementation
> >
> >
> >
> >Howdy,
> >This is a good point.  We should have the JMX configurable or perhaps tied
> >to the repository selector, since you will want the log4j repository and JMX
> >domain to match.
> >
> >Yoav Shapira
> >Millennium ChemInformatics
> 
> --
> Ceki Gülcü
> 
>       For log4j documentation consider "The complete log4j manual"
>       ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to