On 18/10/2010 23:02, Mark Thomas wrote: > On 18/10/2010 16:56, Mark Thomas wrote: >> On 18/10/2010 12:05, Mark Eggers wrote: >>> I saw a mention of this on the Quartz forums. People there seem to think >>> it's a >>> race condition between Quartz's scheduler shutdown and Tomcat's thread >>> memory >>> leak reporting. >> >> That is certainly possible. There was a reason I wrote the message "This >> is very likely to create a memory leak." rather than "There is a memory >> leak." >> >> Options to consider: >> - is there a way to perform a synchronous shutdown of the scheduler? >> - can you detect if the scheduler has not shutdown an loop (for a >> limited time) waiting for it to finish? > > Something that occurred to me just after I hit send. These threads > really need to finish up *before* Tomcat shuts down the context. Tomcat > does a bunch of clean-up stuff to prevent memory leaks and if > application code is still running when the clean-up code runs the > clean-up could easily fail.
Calling scheduler.shutdown(true); /should/ cause it to block & wait for existing jobs to finish. The Quartz supplied Listener does appear to do this: http://svn.terracotta.org/fisheye/browse/Quartz/trunk/quartz/src/main/java/org/quartz/ee/servlet/QuartzInitializerListener.java?r=HEAD p
0x62590808.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature