That leads to an interesting point. There is no reason why I cannot
populate that HashMap every time a request comes in. I was looking for
events from Tomcat. But I can combine that with events from the user
(requests for pages!).

Good thinking! Thanks a lot!

-Andrew



> -----Original Message-----
> From: Joe Riopel [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, April 05, 2005 4:30 PM
> To: Tomcat Users List
> Subject: Re: HttpSessionListener events after redeployment?
> 
> Could you use the isNew() method from HttpSession ?
> 
> On Apr 5, 2005 4:20 PM, Clute, Andrew 
> <[EMAIL PROTECTED]> wrote:
> > 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
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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

Reply via email to