Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: which method gets called first listener.sessionDestroyed() or session.invalidate()

Shapira, Yoav

2003-08-11



Howdy,
As its name implied sessionDestroyed is the last event in the session's
life cycle (excluding a custom finalizer is there is one and actual
garbage collection). The session will have been invalidated when this
gets called, and that's why you get the exception. For more
clarification, read the servlet specification on sessions...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: dutta_kaushik@(protected)
>[mailto:dutta_kaushik@(protected)]
>Sent: Sunday, August 10, 2003 1:35 AM
>To: tomcat-user@(protected)
>Subject: which method gets called first listener.sessionDestroyed() or
>session.invalidate()
>
>Hi All,
>
>I have written a Http Session Listener for logging
>session termination event.
>
>In my listener I am trying to get user related data by calling
getSession()
>then
>getAttribute() method. Here I am always getting an exception saying
>IllegalStateException
>: Session Already
>Invalidated.
>
>Could you please tell me why session is getting invalidated before
calling
>listener.sessionDestroyed(..) method.
>
>Thanks,
>
>Kaushik Dutta




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.