Re: Servlet never gets destroyed

Ever Olano wrote:

>  Hello.  I'm new to both Jigsaw and servlets so pardon me if this query is
> rather basic.  I put some trace statements inside the init() and destroy()
> methods of my servlet.  To my surprise, only the init() gets called everytime
> I invoke the servlet directly from the Address line in the browser.  And I
> never see destroy() getting called.  So I guess my question is, how do I
> explicitly unload a servlet from within JigAdmin?  If there is no way inside
> JigAdmin, how can I unload it then?  Would it automatically unload after some
> time?

Yes, there is a general servlet timeout (in servlet properties [1]) and a per
servlet
timeout in the servlet wrapper [2]. Jigsaw unload the servlets when the tiemout
is
reached.

> Also, how come my servlet's init() always gets called (which probably means, a
> new instance of my servlet gets created each time)?

The init method is called the first time the servlet is accessed.The init method
could be
called again if the destroy method was called or if the servlet class is
reloaded.

> Maybe I do not fully understand a servlet's life-cycle.  Please someone
> enlighten me on this. Thanks in advance for any help.Ever

[1]
http://www.w3.org/Jigsaw/Doc/Reference/org.w3c.jigsaw.servlet.ServletProps.html#org.w3c.jigsaw.servlet.servlet-timeout

[2]
http://www.w3.org/Jigsaw/Doc/Reference/org.w3c.jigsaw.servlet.ServletWrapper.html#servlet-timeout

Regards, Benoit.

--
- Benoît Mahé -------------------------------------------------------
                      World Wide Web Consortium   (W3C)
                    Architecture domain - Jigsaw Engineer

                http://www.w3.org/People/Mahe  - bmahe@w3.org
---------------------------------------------------------------------

Received on Friday, 9 April 1999 03:35:37 UTC