Thanks Yoav. I would like just to add that functionality in contextDestroyed(), but that does not seem to get called when my JVM shutsdown. I am using a version of TC 4.1.7 running as a service, and the service calls has:
Stop Class"="org.apache.catalina.startup.BootstrapService" "Stop Method"="main" "Stop Param Count"=dword:00000001 "Stop Param Number 0"="stop" but contextDestroyed() nor Servlet.destroy() gets called when I shutdown tomcat. After testing, I am not sure that adding this shutdownHook() in the Servlet will work. I am not sure what I could be doing wrong? it seems as though others have similar issues (as I am sure you know), so could it be Tomcat? -----Original Message----- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:01 PM To: Tomcat Users List Subject: RE: Runtime.getRuntime().addShutdownHook() Howdy, Yes, it can be used. I've used it without a problem. You just want to be careful: most things you'd put as a shutdown hook in a normal program should go in a ServletContextListener's contextDestroyed() event in a servlet container. Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Robert Priest [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 24, 2003 3:55 PM >To: '[EMAIL PROTECTED]' >Subject: Runtime.getRuntime().addShutdownHook() > >Has anyone ever attempted to use this in a servlet in Tomcat? > >I assume it can be used, correct? > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
