The destroy() method is not meant to be called directly by the servlet.  The
servlet engine is responsible for calling this method.  If the servlet calls
destroy(), then there is no way for the engine to know that servlet is in a
destroyed state (which explains why you don't see an init call).  If you need to
reset the state of the servlet while the servlet is in serving mode (i.e, the
servlet engine perceives the servlet as available for service) then you will
need to implement your own private mechanism to block incoming requests
temporarily and reset your state and then begin accepting requests again.

-Spike

-----
Spike Washburn
IBM WebSphere Application Server
Internet E-mail: [EMAIL PROTECTED]



Bob Love <[EMAIL PROTECTED]> on 05/04/99 02:33:03 PM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Donald Washburn/Raleigh/IBM)
Subject:  Servlet destroy() method





How do you destroy a servlet?  I have an error condition that requires that the
servlet be destroyed and re-initialized so I call the destroy() method using
this.destroy(). The method body is:

public void destroy ()
{
   super.destroy();
}

A message is logged stating that the servlet is destroyed but it is still in
memory and the next time I run the servlet it does not go thru the init()
method.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to