tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Is there a signal I can listen to for Tomcat shutdown?
Date Thu, 20 Jul 2000 17:43:53 GMT
"Bragg, Casey" wrote:

> How can I determine when Tomcat is shutting down?  I'd like to run some
> cleanup methods first.
>

The typical approach today is to have a load-on-startup servlet that is
never actually called to serve requests.  The init() method of this
servlet
can be used to set up your resources in the first place, and the
destroy()
method can be used to clean up.  This relies on the fact that Tomcat
won't
unload the servlet in the mean time, which is true for Tomcat today but
is
not guaranteed behavior.

The next version of the servlet spec will have more formal support for
application startup and shutdown events.

>
> Thanks...
>
> ...Casey

Craig McClanahan

Mime
View raw message