Re: destroy method

Milt Epstein <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
On Thu, 31 Jul 2003, Milt Epstein wrote:

> On Thu, 31 Jul 2003, Pradeep Kumar wrote:
>
> > Can someone tell me, when does the web container destroys the
> > servlet object?
> >
> > More specifically, are the servlet objects destroyed whenever the
> > container goes down? Or, is it that the container can destroy the
> > object and recreate it periodically.
>
> You can make no assumptions about when the container might
> destroy/re-create servlets, because it can do it anytime it wants.  As
> to whether servlets are destroyed when the container goes down, that
> probably depends on how it goes down -- if it's a clean shutdown, most
> likely all servlets will be destroyed, if it's a crash, probably not.
>
>
> > According to the specification, there must be one and only one
> > instance of a servlet.
>
> Unless you're using SingleThreadModel -- which you should be anyway.
[ ... ]

Whoops -- that should be "shouldn't be".

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[email protected]

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.