Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.4
-
None
-
Operating System: other
Platform: Other
-
35774
Description
Everybody that uses commons-logging in an J2EE Container (especially jboss) has
problems when the TCCL is not the same as the current ClassLoader. The solution
cannot be to drop the commons-logging.jar out of the ear/war file, as it would
prevent to have an application specific logging instance.
Commons-logging preferes the TCCL which is OK. But if it finds a Logger in the
TCCL that does not fit to the current Log interface it throws an error instead
of trying the current CL.
I propose to change this. I will attach a changed LogFactoryImpl.java. The
changed factory still prefers TCCL, but will try the current class loader if the
LOG_INTERFACE is not assignable for the class found via TCCL.
It allows us to run more painlessly in an J2EE Container and to keep
commons-logging class loader preferences.