tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Brogden <>
Subject Re: Sessions and GC
Date Sun, 16 Apr 2000 15:08:55 GMT

Jeremy Johnson wrote:
> Hi all,
> Could someone please clarify for me how Tomcat handles releasing threads that
> contain live session objects. And what that means for garbage collection?
> In other words, if I have a number of servlets that all call session objects,
> and that also instantiate a load of external classes, will the external objects
> not be garbage collected until the session has timed out, eg. 30 Mins+
> So far as I understand, GC can only take place when the thread the object was
> created by is released, which can't happen while it contains objects that may
> be required again, which must include the sessions (?).
> I know this doesn't sound right, but what am I missing? When does Tomcat
> make the objects in a thread created by an http request available for GC?

The Thread that created the object has nothing to do with the
when GC occurs because the session now has a reference to the object.
are managed separately from Threads that respond to requests.


View raw message