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 --- Mark O'Driscoll <[EMAIL PROTECTED]> wrote: > I am trying to keep track of the current sessions > that are active in my web > application. > > I have a HttpSessionListener that is correctly > called on > sessionCreated/sessionDeleted. I keep a reference to > each session in the > servletContext as a Vector. > > If tomcat is restarted then the sessions are > persisted fine. However my > vector of sessions is lost so I have no record of > sessions that were created > during a previous tomcat run. > > Any idea how I could find or keep the list of > previously created sessions? > > Is there any way I can find a list of the current > sessions without keeping a > list (that would be my preference) > > TIA > > - Mark > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> >
__________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
