Howdy,

>Just one point of clarification here: Tomcat would "stop its own
threads",
>my servlet-spawned threads would keep executing, but when they
terminate
>destroy() on the servlet instance is still guaranteed to be called?

No.  Destroy() on the servlet is guaranteed to be called when the
servlet specification says it should be called.  Same thing goes for the
servlet context listener's contextDestroyed() event.  Tomcat could
legally decide to swap out your servlet while some of the threads you
spawned from it are still executing.  Or someone could recycle the
server as part of normal (nightly/weekely/whatever) operating procedure.
In that case, destroy() would get called while your threads are still
executing, and you'll end up in the bad state described in my previous
message.

Yoav Shapira
Millennium ChemInformatics 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to