Does Tomcat call releaseAll() when a web-app is undeployed?

Bernie

> - It is very common to find a declaration like this:
> 
>     private static final Log log = LogFactory.getLog(MyClass.class);
> 
>   From the commons-logging API documentation:
> 
>   "LogFactory needs to keep 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."
> 
> If you are using commons-logging, the LogFactory provides the 
> "releaseAll" method, that can be used to release all the internal 
> references, and can also be called from the 
> ServletContextListener.contextDestroyed() method. In fact, the 
> commons-logging documentation itself recommends to use this method in 
> servlet containers ;-) You can also use the 
> org.apache.commons.logging.impl.ServletContextCleaner class.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to