Update javadoc now that WeakHashtable is part of the standard distribution.
ServletContextCleaner is only a backup for odd corner cases. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@371450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -31,23 +31,19 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
* a webapp, and responds by ensuring that commons-logging releases all
|
* a webapp, and responds by ensuring that commons-logging releases all
|
||||||
* memory associated with the undeployed webapp.
|
* memory associated with the undeployed webapp.
|
||||||
* <p>
|
* <p>
|
||||||
* This class is necessary when code using commons-logging is deployed within
|
* In general, the WeakHashtable support added in commons-logging release 1.1
|
||||||
* a servlet container and commons-logging is deployed via a shared classloader.
|
* ensures that logging classes do not hold references that prevent an
|
||||||
* When commons-logging is deployed in a "shared" classloader that is visible
|
* undeployed webapp's memory from being garbage-collected even when multiple
|
||||||
* to all webapps, commons-logging still ensures that each webapp gets its own
|
* copies of commons-logging are deployed via multiple classloaders (a
|
||||||
* logging configuration by setting up a separate LogFactory object for each
|
* situation that earlier versions had problems with). However there are
|
||||||
* context classloader, and ensuring that the correct LogFactory object is
|
* some rare cases where the WeakHashtable approach does not work; in these
|
||||||
* used based on the context classloader set whenever LogFactory.getLog is
|
* situations specifying this class as a listener for the web application will
|
||||||
* called. However the negative side of this is that LogFactory needs to keep
|
* ensure that all references held by commons-logging are fully released.
|
||||||
* a static map of LogFactory objects keyed by context classloader; when the
|
|
||||||
* webapp is "undeployed" this means there is still a reference to the
|
|
||||||
* undeployed classloader preventing the memory used by all its classes from
|
|
||||||
* being reclaimed.
|
|
||||||
* <p>
|
* <p>
|
||||||
* To use this class, configure the webapp deployment descriptor to call
|
* To use this class, configure the webapp deployment descriptor to call
|
||||||
* this class on webapp undeploy; the contextDestroyed method will tell
|
* this class on webapp undeploy; the contextDestroyed method will tell
|
||||||
* LogFactory that the entry in its map for the current webapp's context
|
* every accessable LogFactory class that the entry in its map for the
|
||||||
* classloader should be cleared.
|
* current webapp's context classloader should be cleared.
|
||||||
*
|
*
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user