Hi all,
I want to get an 'event' before tomcat stops my web application. My application needs to "wrap up" staff before it is being closed.
Any hint?
-- Yonatan
Hi all,
I want to get an 'event' before tomcat stops my web application. My application needs to "wrap up" staff before it is being closed.
Any hint?
-- Yonatan
You can write a ContextListener that responds to deploy/undeploy events. Maybe you can have it sends an email when the context is undeployed.
I'm just not sure if that event is fired if the app server is stopped.
I think I found it, I created a servlet and implemented the
public void destory();
I verified that this method is invoked when I stop the application from the tomcat admin page, and even when I shut-down tomcat server