shutdown hook for java web application

Viewed 45811

I need to save some data preferrably when the java web application is stopped, or when tomcat is stopped. how can this be done? Edit: any drawback if I use the jvm shutdown hook?

4 Answers
Related