I haven't tried this yet but you might want to "touch" your class file for
your servlet so that the engine things that it has changed. This should
cause the servlet engine to call your destroy() method, then reload the
class file, then call init().

John Zerbe - Mellon Bank
Phone:  412-234-1048   E-Mail: [EMAIL PROTECTED]



> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, May 04, 1999 3:25 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Servlet destroy() method
>
> 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

___________________________________________________________________________
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