tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <de...@oma.be>
Subject Re: getsession if you know the id?
Date Mon, 03 Apr 2006 14:29:34 GMT
Pack you HttpSessions in WeakReference objects so they can be GCed
(*not* SoftReferences as suggested because SoftReference are only GCed
when outofmemory, while WeakReference are gced about as soon as the
object is not reachable anymore by hardreference).

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/WeakReference.html
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/WeakReference.html

John Powers a écrit :

>We were using a list of sessions to report who is logged in now.
>however our sessions don't look like they are being collected by the GC.
>We have a serious memory problem.   I was thinking this list may be a
>problem so I was removing all the actual httpsessions from it and was
>going to just 'get' the session from the application at display time.  I
>can record its ID.. but I can't see a way to get it based on that ID, or
>anything.   
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message