Servlet Destroy() Methods

hi guys,i have written a Servlet and in this Servlet i have called destroy() method beforecalled init()what will happen.....?saM
[170 byte] By [saM@spia] at [2007-10-3 4:17:36]
# 1

Normally its not you who call destroy or init methods. Its the containers job and the container will invoke them in proper time.

Generally once destroied a servlet is unusable. But when it comes to individual servlets it depends on whats written in the destroy method and how that affects to the rest of the servlet.

EDIT: No offence but this thread is in the wrong forum

LRMKa at 2007-7-14 22:19:14 > top of Java-index,Core,Core APIs...
# 2

All of a servlet's service methods should be complete when a servlet is removed. The server tries to ensure this by calling the destroy method only after all service requests have returned or after a server-specific grace period, whichever comes first. If your servlet has operations that take a long time to run (that is, operations that may run longer than the server's grace period), the operations could still be running when destroy is called. You must make sure that any threads still handling client requests complete

kilyasa at 2007-7-14 22:19:14 > top of Java-index,Core,Core APIs...
# 3
Also not to mention that there is no guarantee that the destroy method would ever be called.
kilyasa at 2007-7-14 22:19:14 > top of Java-index,Core,Core APIs...
# 4
Hi,,Before the init() method you cant call Destroy() method,because only after the ini() method is called,the java class becomes a servlet.Then only destroy method exists.ThanksSajan
sajan.ca at 2007-7-14 22:19:14 > top of Java-index,Core,Core APIs...
# 5
What does this have to do with Serialization?
ejpa at 2007-7-14 22:19:14 > top of Java-index,Core,Core APIs...