commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Jaynes <>
Subject [logging] components at server and web app levels
Date Tue, 07 Oct 2003 15:01:21 GMT
It seems to me that commons-logging has lead me into a classloader 
quagmire. In a J2EE environment (I use Resin) how can different 
components that use commons-logging be deployed at different levels of 
the app server without problems? I can't find a way to centralize, at 
the  server level, any components that make use of commons-logging.

Example: I need to use Slide which uses HttpClient which uses 
commons-logging. These are used in most of my web apps, so I feel they 
should be deployed at the server level in resin/lib. But my web apps use 
Struts which uses commons-logging also. And my own web app classes just 
use log4j straight up.

I haven't been able to find any combination of jars-in-libs that works, 
except putting all jars in the WEB-INF/lib.

The problem seems to come down to the fact that the classloader that 
loads the LogFactory class may not be the same as the thread context 
class loader that LogFactoryImpl uses to find the default logging 
implementation (in my case, Log4j) But I'm waaay out of my comfort zone 
of knowledge.

So... Is it possible to use some components that use commons-logging at 
the server level, and yet still use other components that use 
commons-logging in a web app?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message