> -----Original Message-----
> From: Nic Ferrier [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, October 04, 1999 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Very Difficult Servlet Question (Answer not found in
> Servletbooks)!!
>
> >>> Ted Stockwell <[EMAIL PROTECTED]> 10/4/99 4:11:19 PM >>>
>
> > My senior programmer put me 2 questions w.r.t. threads, servlets
> and the
> > servlet engine.
>
> Firstly the answers can be found... mostly in the spec.
>
> Secondly is this individual a doubter of the true path to
> server-wisdom? Does he (gasp!) use MicroTo$$ products? 8->
>
> > 1. Suppose unloading or terminating the servlet by calling its
> destroy()
>
> Ted wrote:
> > If the servlet is merely being reloaded then you should
> start a
> >separate thread that waits for all service methods to finish
> executing and
> >then destroys the servlet.
>
> You don't need to worry about any of this!
>
> The servlet's contract with the Servlet Engine *ensures* that the
> servlet's destroy method() is called *only* when all service threads
> within the servlet's service() method are complete.
>
clarification...
It sounded to me like the purpose of the questions was to understand
what's going on inside the servlet container, therefore I answered the
question from that perspective. Certainly, a servlet should never call its
own destroy method, the servlet container ensures that destroy methods are
called for you.
ted
___________________________________________________________________________
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