In tomcat 5.0.29, when I shutdown and restart the appl thru the Manager, the 
HttpSession objects are NOT destroyed while the appli's ServletContext IS 
(together with other info like the set of Principal's).  Keeping the 
HttpSessions could be a good feature for maintaining the state of the web 
appli. across restart; however, sometimes the application would keep session 
related information in the ServletContext.

For example, my appli uses a HttpSessionListener to register every session 
object created/destroyed into a Map inside ServletContext.  This allow me to 
write an admin servlet to monitor the no. of active sessions by reading the 
servlet context.  But, in order to make this approach working, the no. of 
session objects must be consistent with my Map in the servlet context.  And, 
this cannot be achieved when the appli restart.

Is there a way to ensure the Servlet Context is also intact after a restart?  
Or, what approach should we take if we need to keep sessions related info into 
a global data structure whose lifespan should be the same as the sessions 
themselves.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to