John,

The simple and intuitive solution that Hansen
provided can be used to log when an HttpSession
instance is GC'd since the objects that instance
holds *unique* references to will also be GC'd.

So, the question becomes, which classes are
holding references to HttpSession objects and
preventing them from being GC'd?

We used a tool years ago to analyze the heap when
we were tracking down some elusive memory issues.
Heap Analysis Tool: <https://hat.dev.java.net/>

-Bob

--- John Powers <[EMAIL PROTECTED]> wrote:

> thats not what i'm talking about.
> 
> after a session times out...  tomcat removes it from
> its list of sessions.  a session listener will show
> that it leaves.
> 
> however, a GC then needs to see if its available for
> collection on the next go around of the GC.    if i
> force the GC, or whenever it decides to happen, my
> objects under the session aren't being collected.
> 
> so then.   how can you know when the session itself
> is collected (not timed out)
> 
> 
> 
> -----Original Message-----
> From: Farrow, Marc [mailto:[EMAIL PROTECTED]
> Sent: Fri 3/31/2006 5:36 PM
> To: Tomcat Users List
> Subject: RE: session GC
>  
> easiest way to make sure they are GC'd is to set
> session time-outs.
> 
> -----Original Message-----
> From: John Powers [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 31, 2006 6:07 PM
> To: Tomcat Users List
> Subject: session GC
> 
> 
> How do you know when a session is garbage collected?
> You can write a sessionlistener for when it gets
> deleted out of tomcat,
> but after that, when do you know if its garbage
> collected?
> 
> I currently do not think my sessions are being
> collected.   Within a day
> 500M of memory get eaten up and I can't collect them
> manually even.  So
> I want to know when/if the sessions are being
> collected.
> 
> If I wrote a subclass to httpsession, how could get
> tomcat to use it?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to