aspose file tools*
The moose likes Servlets and the fly likes destroy() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "destroy() method " Watch "destroy() method " New topic

destroy() method

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
Isn't it mandatory for the servlet engines/app.servers to call this method when they are shut down? I am testing the servlets with Resin 2.0.5 and Tomcat 3.3.1. My Servlet has a log statement in the destroy() method which never gets written to the log file (I see all the other log statements), which makes me believe that this method is not being called. So, is this method only called when the servlet is 'unloaded'? If yes, how will the servlets be able to clean up after themselves in case the app.server shuts down?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12806
How are you telling the server to shut down? Are you using the Shutdown script provided?
jQuery in Action, 2nd edition
subject: destroy() method