I think you make it a bit to comlicated. The session is invalidated automatically by tomcat. (See <session-timeout> in web.xml)
The only thing that you have to do is implement a HttpSessionBindingListener store an instance of this class in the session. What job are you talking about? Do you start an operation system job whenever a session is started? Or do start a java thread or what ? > -----Urspr�ngliche Nachricht----- > Von: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 14. August 2002 17:14 > An: Tomcat Users List > Betreff: Re: How to keep track of sessions > > > Hi > Can some one provide with some java code where in they > have used HttpSessionListener, and then stored the > sessions in a vector when a new session is created, > and remove it when it is invalidated. > i m developing a webapplication where in the database > is as400, so when ever a user logs in a job is run on > as/400, but if the user just closes the browser > without signing out, then this job runs on as/400 > untill i restart tomcat, so i would like to know when > the user closes the browser, but there is no way i > can find it out, so i think i will store all the > sessions created in a vector, and when the user > signoff I will remove the session from vector and then > also run schedule job say after 30 min which will > check the session from the vector,to find when was it > used last time, and if it is more then some time say > 30 min, invalidate that session, which will stop the > job running on as400 is there a better way of doing it.. > Ashish -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
