balwinder singh wrote:

> Hi
> Could u please tell me what is "container" ..and when server execute destroy
> method?
> Thanx
> Balwinder Singh
> [...]

Hi :-)  the following is from Servlet spec2.3(servlet23_PFD.pdf):


2.3 Servlet Life Cycle
...
2.3.4 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
...



in that file, before the above, you also can find:
2.3 Servlet Life Cycle
2.3.1 Loading and Instantiation
2.3.2 Initialization
2.3.3 Request Handling



Bo
May.01, 2001

___________________________________________________________________________
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