tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Jackson <m...@optimad.com>
Subject RE: Unexpected reload of MainServlet
Date Thu, 09 Jan 2003 18:56:41 GMT
Thanks for the clarification.

Matt

-----Original Message-----
From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
Sent: 09 January 2003 18:50
To: Tomcat Users List
Subject: RE: Unexpected reload of MainServlet


Hi,

>Surely the point of
>being loaded on Tomcat startup is that servlet object is kept in
continuous
>reference for the life cycle of the Tomcat instance - thereby never
being
>garbage collected.

Absolutely not.  That's neither the letter nor the spirit of the spec.
It is, however, a fairly common misconception.

If you want something that's loaded on startup of your context and then
stays there until the context is destroyed, use a <listener> (possibly
one that implements ServletContextListener).

Servlets, including load-on-startup servlets, should not assume they
will be in memory for the lifetime of the server.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message