I'm trying to figure out if memory used by sessions (e.g. session beans) ever gets recovered, or if that doesn't happen until my app server (in my case, Tomcat) gets restarted (or until the system crashes?). All I know is that every time a user logs into the site, new session beans get instantiated, and I don't see how they'd ever get disposed of if the users don't explicitly send a request to the server to log out (if they just close their browser, the server wouldn't know that). So it seems like memory usage should just go up and up...or does Tomcat somehow convince Windows to stick some things that are in memory into virtual memory so that not so much of the physical memory is in use? Am I missing something big here?
The website I currently maintain has thousands of users--maybe not that memory is required for a few session beans per user. I tried to get a straight answer out of the original developer of the site, but he's usually unresponsive to me unless we have an emergency! I'm trying to catch up on my gaps in J2EE knowledge in the meantime...
Ok, I'm no guru on this, but I understand that each session has a timeout. Which means that once the user has not done anything for a period greater than this amount, the session is wiped and presumably all memory recovered. The only way that you should get a memory leak would be if you've set the server to unlimited time on the timeout setting.
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop