All,
Maybe this should be sent to the dev list, but I wanted to see if
anybody else has seen this problem, and what if anything they've been
able to to mitigate it.
There are a couple of cycles in the classloader that are causing
problems with undeployment inside of Tomcat.
In this instance, I think these classes are creating the problem:
org.apache.axis2.engine.ListenerManager
org.apache.axis2.engine.ListenerManager.ListenerManagerShutdownThread
is a class, all classes hold a reference to their classloaders, and
all classloaders hold a reference to every class they've loaded. This
ListenerManager creates ListenerManagerShutdownThread and hands it to
the Java runtime by calling: Runtime.getRuntime().addShutdownHook(new
ListenerManagerShutdownThread(this));
So now, it's in the data structures held by a lower level classloader
(I'm not precisely sure which one). Because the JVM proper is holding
a reference to this class, and by extension it's classloader, the
classloader can't be unloaded, and I'm is contributing to the permgen
problem. I think that all that needs to be done is to add a reference
to the shutdown reference, and add a call to
"System.getRuntime().removeShutdownHook(shutdownThread)" in the stop
method somewhere.
Is anybody else have problems with deployments, and re-deployments
inside of Tomcat? Maybe I'm doing something else wrong.
Thanks,
Kirby