Gerwood Stewart wrote:
> Mark
> 
>> 2. Why would Tomcat be cleaning up the WebappLoader instance everytime 
>> successfully but seems to 'hang-on' to the WebappClassLoader instance?
> My money is on it being JVM code rather than Tomcat code that is hanging
> onto the WebappClassLoader. Are you testing with JDK 1.6.0_15 or later
> by any chance?
> 
> Yes. I'm using Apple's JVM and Suns (on Ubuntu 9.04)

As I suspected.

> I traced the webappclassloader gcroot. It appears to be connected via 
> sun.awt.AppContext?

Yep - also what I expected to see.

> Any thoughts.

Give this a go:
http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java

You'll need to add
<Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />

to your server.xml (adjust class name as necessary - it doesn't have to
be in a Tomcat package)

It should help with JAR file locking too. The plan is to add more
work-arounds to this listener as they are identified.

For those of you that like your humour with an ironic twist, you may be
amused by the first commit messages for this class:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?view=log&pathrev=830908

Mark




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

Reply via email to