Hi, I am trying to use JCL 1.1 with log4j in an application which is deployed on WebSphere 6.0.2. I found that the documentation for running JCL on WebSphere, only works on WebSphere 5 and not 6.
In WebSphere 5, the container has it's own custom implementation of LogFactory. The documented way for an app not to use that log factory is to set a system property for LogFactory=LogFactoryImpl and use the PARENT_LAST classloader mode to pick up commons-logging.jar shipped with the WAR file. This works as documented. However, in WebSphere 6, the container itself configures LogFactoryImpl as the factory impl and also Jdk14Logger as the log impl. If an app only configures LogFactoryImpl, it now uses JDK logging and not log4j which is on the app classpath. So I tried adding a commons-logging.properties to my app classpath and configured LogFactoryImpl and Log4JLogger as the factory and log impl classes respectively. Using JCL 1.1 diagnostics (nice feature btw) I saw that WebSphere's commons-logging.properties file was being loaded before the application's file, even though I was using PARENT_LAST. I finally got it working by giving my application's file a higher priority i.e. here is the app's commons-logging.properties file: priority=1 org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Lo gFactoryImpl org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogg er >From what I've read this is not a documented solution for WebSphere 6. Therefore, if anyone has successfully used another approach I would be very interested to hear. If not, then maybe this is worth adding to the JCL documentation and I can discuss further with IBM. BTW, what was the reason to deprecate and then remove org.apache.commons.logging.impl.Log4jFactory as this provided a workaround for this specific issue? Thanks, Seamus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]