You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lionel Farbos <li...@free.fr> on 2005/12/02 12:35:34 UTC

Re: Singleton memory leak after redeploying.

Hi Rémy,

It's a very good news for all !!!
Until now, we used a CleanupListener to do such things, and webapps could use it or not. 
Now, Tomcat will do this automatically for us :-))

But I need some complements :
- this new feature will be integrated in Tomcat 3 ? Tomcat 4 ? Tomcat 5.0 ?
- in the clearReferences(), you put static and final fields to null; perhaps (?) this can have bad side effects on webapps ?...
  For example, if a thread is not stopped and envisage to do something when such static variable is null ...
  It's not a classic need ... but, perhaps, it is a real use case ?...
- So, will it be possible to configure this new feature on such contexts ?
- My webapps generally don't use commons-logging : they use log4J; so, LogFactory.release will throw an exception. No ?

In advance, Thank you.
Regards.

On Wed, 30 Nov 2005 14:29:15 +0100
Remy Maucherat <re...@gmail.com> wrote:

> On 11/30/05, Remy Maucherat <re...@gmail.com> wrote:
> > This issue also affects Hibernate. As it doesn't seem to be a Tomcat
> > bug, but would be good to have a fix for, I've added possible
> > workarounds for that (reflection code which sets as many static fields
> > as possible to null in loaded classes when stopping the classloader)
> > in the latest Tomcat code (which you need to get from SVN). It would
> > need testing.
> 
> To test this, recompile the class here and replace the original in
> catalina.jar (or put in in the appropriate folder under
> server/classes):
> http://svn.apache.org/viewcvs.cgi/*checkout*/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=348448&content-type=text%2Fplain
> 
> --
> xxxxxxxxxxxxxxxxxxxxxxxxx
> Rémy Maucherat
> Developer & Consultant
> JBoss Group (Europe) SàRL
> xxxxxxxxxxxxxxxxxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org