In my application I like to keep track of all the sessions that are
currently active. So, I have a class that implements HttpSessionListener
and have a static HashMap that keeps a reference to all the active
sessions.
 
Everything works great. I get the events, and can track them without any
issues.
 
My problem arises when I redeploy my application. My sessions serialize
just fine, and recreate ok as well. However after redeployment, I have
no references to the active sessions (since my static Map has been
destroyed). 
 
Are there any events I can listen for when a session is recreated from
serialization? I was hoping for HttpSessionListener.sessionCreated(),
but that doesn't happen, and I can understand why. Maybe there is a
cleaner way to get a reference to all of the sessions active on my
server that will survive serialization?
 
Thanks in advance!
 
-Andrew

Reply via email to