Hi,
I'm having trouble implementing the model 2 design pattern using
Weblogic 5.1. It seems the container is constantly calling
destroy on the servlet and re-initializing a new instance. So any classes
or data that I have cached is being erased.
Looking at the Servlet 2.2 spec I'm not sure if this is problem or not.
From Servlet 2.2 spec:
End of Service
The servlet container is not required to keep a servlet
loaded for any period of time. A servlet
instance may be kept active in a servlet container for a
period of only milliseconds, for the lifetime
of the servlet container (which could be measured in
days, months, or years), or any amount of time
in between.
When the servlet container determines that a servlet
should be removed from service (for example,
when a container wants to conserve memory resources, or
when it itself is being shut down), it must
allow the servlet to release any resources it is using and
save any persistent state. To do this the
servlet container calls the destroy method of the Servlet
interface.
Before the servlet container can call the destroy method,
it must allow any threads that are
currently running in the service method of the servlet to
either complete, or exceed a server
defined time limit, before the container can proceed with
calling the destroy method.
Once the destroy method is called on a servlet instance,
the container may not route any more
requests to that particular instance of the servlet. If
the container needs to enable the servlet again, it
must do so with a new instance of the servlet's class.
After the destroy method completes, the servlet container
must release the servlet instance so
that it is eligible for garbage collection
Thanks,
Tony
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets