Would someone be so kind to point in the right direction on how to manage a web session? I have a web application and the memory footprint continues to grow as users kill their browsers. I have been told WAS is hanging onto objects to long. The best way to handle this quickly is manage the session programmatically and destroy the objects when the session is "terminated" by killing the browser.
Also note that you can remove individual references when they are no longer needed with the HttpSession method "removeAttribute" - depending on your architecture you may be able to reduce the memory footprint that way. Bill
The best way to handle this quickly is manage the session programmatically and destroy the objects when the session is "terminated" by killing the browser.
True. Assuming you can accurately communicate to the server when a browser window is closed, which unfortunately you can't, and assuming the user will actually close the browser when they are finished, which they may not. The usual way to handle this is to time inactive sessions out. Search this forum if you don't know how to do that.
(Dang! Too slow) [ June 17, 2005: Message edited by: Paul Sturrock ]
Ahh yes the old "stupid users wont use the logout function on my site" problem... man I know it all too well. I would have to ask a few questions..
what kind of goodies are you storing in the users sessions? (hopefully not the magna carta)
are you setting the interval for time out with setMaxInactiveInterval? (if so for how long)
You may want to look into that and HOW MUCH info you are storing in the sessions. If you are sucking up tons of memory I have a feeling you may be stuffing too much into them..