tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wall <d.w...@computer.org>
Subject Re: TC 6.0.20 - how to know session restored on restart?
Date Fri, 07 Aug 2009 20:16:36 GMT

>> My first attempt was to implement those two methods in my class that
>> already implements HttpSessionListener, but these methods were never
>> called.  On closer reading, it appears that this is an interface to be
>> implemented by an object that I then store in the session attributes. 
>> Do I create an object that implements HttpSessionActivationListener,
>> store that in all sessions so on restart Tomcat will then notify those
>> objects that they have been activated so I can then store the session
>> info in my list?
>>     
>
> Short of delving into the Tomcat internals, I think that is your only
> option.
>   
That appears to work well enough for me.  We already stored some info in 
the session so that we could also determine the user who is associated 
with the session among others, so we just created an object to hold this 
info and it implements HttpSessionActivationListener and sure enough, on 
tomcat restart, it gets called so I can rebuild the list.

Thanks much,
David

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message