This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

JavaRanch » Java Forums » Java » Servlets
Bookmark "destroy() method?" Watch "destroy() method?" New topic

destroy() method?

Vilas Lawande
Ranch Hand

Joined: Nov 07, 2006
Posts: 127
hi ,

Can destroy() method of servlet execute when server is crashed?

Vilas Lawande
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
The Destroy method executes when the server shuts down regularly.
If your system crashes or freezes it might well be that this method is never called.

JDBCSupport - An easy to use, light-weight JDBC framework -
Vilas Lawande
Ranch Hand

Joined: Nov 07, 2006
Posts: 127
thanks a lot
Keshav Prasad gurukul

Joined: Feb 25, 2009
Posts: 14
since during server crash destroy is not called
we must be prepared for this scenario and must
not depend on it completely for performing cleanup

SCJP5 94% SCWCD5 86% SCBCD5 86%
Have you checked out Aspose?
subject: destroy() method?
It's not a secret anymore!