I am running a J2EE web application on Tomcat, and recently I was tasked with adding metrics to the application. I use SessionListener to determine when a session is destroyed, and then load the metrics into the database. My session timeout is set in my web.xml for up to 30 minutes, and I do not programmatically invalidate the session. Often within 1 5-10 minutes, when I sign up for testing, I will see 3 or 4 sets of indicators loaded into the database, all with different session identifiers.
Besides web.xml and session.invalidate (), what else could lead to the destruction of the session in Tomcat? Exceptions? Will Tomcat ever randomly terminate sessions?
source
share