Mike Engelhart wrote:
> Hope this isn't too off topic, but does the destroy() method block until all
> the outstanding service methods are finished running? I mean, does it enter
> the method and then block (if that's what it does) or does it process the
> code inside the method and then wait? What's the order?
>
> Thanks,
> Mike
>
What is supposed to happen goes like this, according to the 2.2 servlet spec:
* Servlet container decides to remove a servlet instance from service
(to conserve memory, to prepare for container shutdown, or whatever).
* Servlet container waits for any existing request threads in the service()
method of this instance to complete. Optionally, it can impose a server
defined timeout on how long it waits.
* The destroy() method is called. Before this actually happens, new requests
are no longer allowed to use this instance.
* Finally, the servlet container releases all references to this instance, so that
it can be garbage collected.
If a new request comes in later for the same servlet, a new instance will be
initialized -- the old instance will never be reused.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html