File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to call destroy() method ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to call destroy() method ?" Watch "how to call destroy() method ?" New topic
Author

how to call destroy() method ?

sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1031
how the container identify which servlet instance to call destroy() method ?
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
The container doesn't select any particular servlet to call the destroy() method on. It will call the destroy() method on all live instances of servlets that are present.
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

Finally, when the servlet is about to be removed from memory, the container calls its destroy() method.
and that is servlet one last chance to clean up resources.


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call destroy() method ?
 
Similar Threads
when destroy method will call
destroy method of servlet
destroy() method
service() in HttpServlet
How to stop a servlet from executing