On 29/03/2010 10:19, Steffen Heil wrote: > Hi > >>> I am thinking about a strategy to iterate over all running threads and >>> interrupt (and if absolutely necessary stop) all threads started by a >>> certain classloader (not sure if it is possible, but I suspect so - > might >>> require instrumention though.) >> Tomcat can already do this. > > Great. Where can I find the code for this and how is it enabled? > Is there any documentation of that feature?
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?view=annotate Look for clearReferencesXXX() methods http://wiki.apache.org/tomcat/MemoryLeakProtection http://tomcat.apache.org/tomcat-6.0-doc/config/context.html clearReferencesStopThreads >> You don't want to use it though. In my testing the JVM crashed about 50% > of the time. > > I don't understand this. It should definitely not crash. (It might (but > should not) leak resources however...) There is no safe way to terminate an arbitary Thread. >> Tomcat will also tell you which threads weren't stopped along with a bunch > of other memory leak checks. > > Where can I find this? I would be very much interested. Never seen that. See above. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org