Affects Version/s: 1.0.4
Fix Version/s: 1.1.0
Operating System: All
LogFactory.java maintains a static cache (Hashtable) of LogFactories, keyed by
context ClassLoader. In JBoss, and may be in many other J2EE containers, each
hot-redeployment of a J2EE application makes a new class loader for the
application, destroying all references to the old one. However, commons-logging.
jar is loaded by a parent classloader which is common for all applications, and
still maintains hard references to would-be-dead ClassLoaders of undeployed
applications. This leads to significant memory leaks, because all static members
of all classes of the undeployed applications do not become a subject for GC. It
would be excellent if this LogFactory caching could be disabled through a config
or a WeakHashMap is used instead of Hashtable.