Remember that only a single instance of the servlet is created the first
time it is called.  It is up to tomcat to decide weather to call that
servlet's destroy() method. I personally prefer that the servlet is just
waiting for a request rather then being destroyed frequently as your
performance will be better and servlets are idle while not in use. The
effect on memory or cpu usage is extremely low (insignificant?). Your
individual sessions will clean up after themselves.

I have been closely monitoring this on a Linux server and have found
everything to work perfectly.  You can try starting tomcat with
the -verbose:gc Option and watch the garbage collector at work. (beware this
is allot of information) I have been very impressed with the garbage
collection with Sun JDK1.3x.  I also use NT2000 but haven't monitored the
situation as closely in that environment.

Regards,
Craig

-----Original Message-----
From: H.F.N. den Boer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 3:36 AM
To: Tomcat users group
Subject: Re: Cleaning up servlets


The main question here is when Tomcat or the JVM decides that a servlet can
be
garbage collected.
Objects that I store in a session (shopping carts) are cleaned up perfect.
However, servlets are not cleaned up until I shut down the NT service
manually.

In Apache webserver with JServ there is (if my memory serves well) a setting
for
the maximum lifetime of a servlet after the last hit (doGet or doPost).
In Tomcat with IIS I don't know how to set this or how it is arranged
"automatically". That's why I asked...

Nico

----- Original Message -----
From: "H.F.N. den Boer" <[EMAIL PROTECTED]>
To: "Tomcat users group" <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 10:42 AM
Subject: Cleaning up servlets



Reply via email to