tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: modifying shutdown behaviour?
Date Mon, 27 Oct 2003 14:01:40 GMT

Yup, that's a good suggestion.  You actually have extremely fine tuned
control over the shutdown process, including:
1. Session destroyed
2. Servlet destroyed
3. Filter destroyed
4. Context destroyed
5. Any class finalize() method
6. Runtime#addShutdownHook(Thread hook)

The above list is not exhaustive, there are even more things you can
hook on shutdown ;)  1-4 above are specific to servlet containers, 3 to
servlet 2.3 and later containers, 6 to JDK 1.3 and later.

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Bodycombe, Andrew []
>Sent: Monday, October 27, 2003 8:27 AM
>To: 'Tomcat Users List'
>Subject: RE: modifying shutdown behaviour?
>You could implement a ServletContextListener. The contextDestroyed()
>will be called when your application is about to be removed.
>-----Original Message-----
>From: Julie McCabe []
>Sent: 27 October 2003 13:30
>Subject: modifying shutdown behaviour?
>Config details: tomcat 4.1.24; java 1.4.1_02
>When the $CATALINA_HOME/bin/ script is called I would like a
>particular web application to release its resources cleanly and perform
>up operations before Tomcat shuts down.
>What is the best method of doing this?  Does it involve modifying the
>$CATALINA_HOME/bin/ script?
>Many thanks,
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message