Hi, I would like to know, if there is a shutdown-hook for Tomcat available. Or what the prefered way is, to correctly unload drivers like JDBC drivers.
Unloading the drivers seems to be important for us, because after redeploying the web appliction to often during continuous integration leads to a OutOfMemory-Errors. And although Tomcat tells me, that it forces the driver to unload, I can see a significant amount of memory allocated additionally each time the webapp is redeployed. My webapp causes Tomcat at shutdown to throw these warning messages: 26.03.2010 12:49:38 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SCHWERWIEGEND: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 26.03.2010 12:49:38 org.apache.catalina.loader.WebappClassLoader clearReferencesStopTimerThread SCHWERWIEGEND: A web application appears to have started a TimerThread named [Timer-0] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled. 26.03.2010 12:49:38 org.apache.catalina.loader.WebappClassLoader clearReferencesStopTimerThread SCHWERWIEGEND: A web application appears to have started a TimerThread named [MySQL Statement Cancellation Timer] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled. 26.03.2010 12:49:38 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SCHWERWIEGEND: A web application appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This is very likely to create a memory leak. 26.03.2010 12:49:38 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SCHWERWIEGEND: A web application created a ThreadLocal with key of type [org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl.ThreadCounterImpl] (value [org.aspectj.runtime.internal.cflowstack.threadstackfactoryimpl$threadcounteri...@4ebfa97b]) and a value of type [org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl.ThreadCounterImpl.Counter] (value [org.aspectj.runtime.internal.cflowstack.threadstackfactoryimpl$threadcounterimpl$coun...@90ff2a1]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Thank you very much Timo Meinen --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org