JSP Shutdown hook

V

Vic

Hi,

Is there a way to register a hook to be called when
the jsp server shutsdown (I'm using Tomcat 4.0.4).
Or should I use the normal method of adding a hook to
the Runtime instance?

Thanks,

Vic
 
A

Arne Solheim

Vic said:
Hi,

Is there a way to register a hook to be called when
the jsp server shutsdown (I'm using Tomcat 4.0.4).
Or should I use the normal method of adding a hook to
the Runtime instance?

Maybe not for the entire server, but you should be able to register
your own implementation of the javax.servlet.ServletContextListener
-interface (via the deployment descriptor for your web application).
Hopefully those notifications would correspond to the webapp being
(re/un)loaded (a call to your implementation of the contextDestroyed
method should then be done when the entire server is being shut down
I guess :))
See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html for
JavaDoc on javax.servlet.ServletContextListener, etc.

Regards,
Arne Solheim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top