Caldarale, Charles R wrote:
From: Peter Crowther [mailto:peter.crowt...@melandra.com] Subject: RE: Tomcat for Dummies

Or does one have to implement in each servlet some
kind of callback routine that the ContextDestroy can call ?
That works too.

Not really.  From the API spec for contextDestroyed():

"All servlets and filters have been destroy()ed before any ServletContextListeners 
are notified of context destruction."

Note that the destroy() method for each servlet will already have been called 
prior to the invocation of contextDestroyed().  Individual servlets should have 
already done whatever cleanup is specific to them; the contextDestroyed() call 
is for cleanup necessary for the entire webapp.

Now, do I understand this wrong, or does it mean that in fact the running servlets are not being notified in any way that the application is being stopped ? So there would be no way for a servlet that is active, and is involved in some lengthy operation, to interrupt what it is doing and close down cleanly ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to