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
Author

destroy() method

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 422
Hi,

1. Because destroy() is callback method which is called by Container when the server is about to shutdown, Do we need to override it (or) leave it to the container.
2. Even though I write couple of System.out.println() statements in destroy() method and shutdown the server, they are not printed on the console.

Please advice.


OCPJP 6.0-81% | Preparing for OCWCD
http://www.certpal.com/blogs/cert-articles | http://sites.google.com/site/mostlyjava/scwcd |
Javin Paul
Ranch Hand

Joined: Oct 15, 2010
Posts: 281


Hi Hari,

As per my knowledge destroy() method is called before a Servlet gets unloaded from Container. though its upto container implementation on which other cases its provides callback to destroy() method.

Thanks
Javin


http://javarevisited.blogspot.com - java classpath - Java67 - java hashmap - java logging tips java interview questions Java Enum Tutorial
 
 
subject: destroy() method