tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: java.lang.OutOfMemoryError: Java heap space
Date Thu, 08 Oct 2009 01:40:40 GMT
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: java.lang.OutOfMemoryError: Java heap space
> 
> There are even techniques that will allow your session objects to
> expire when memory gets tight (which is super cool IMO).

To put a name on the above technique, read up on using SoftReference objects to track entries
in your cache(s).  These will allow GC to discard objects not in immediate use when the heap
is full.
http://www.ibm.com/developerworks/java/library/j-jtp01246.html
http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

Mime
View raw message