tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
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
can be used to set up your resources in the first place, and the
method can be used to clean up.  This relies on the fact that Tomcat
unload the servlet in the mean time, which is true for Tomcat today but
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

View raw message