tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Bradley" <lu...@somnia.com>
Subject Re: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general)
Date Wed, 26 Nov 2003 19:18:58 GMT
Thank you for the quick reply.

Lukas


"Shapira, Yoav" <Yoav.Shapira@mpi.com> wrote in message
news:<9C5166762F311146951505C6790A9CF8013DF768@US-VS1.corp.mpi.com>...
> 
> Howdy,
> By the time sessionDestroyed is call, the session has been 
> invalidated. That doesn't mean you can't get information about it: 
> only certain information ;)  HttpSession#getAttribute is clearly 
> documented to throw an IllegalStateException if called on an 
> invalidated session.
> 
> If you're interested in attributes, implement an HttpSessionAttribute 
> or Binding listener.  In it, you will be notified when an attribute is 
> removed and you will be able to access its value.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-----Original Message-----
> >From: Lukas Bradley [mailto:lukas@somnia.com]
> >Sent: Wednesday, November 26, 2003 1:07 PM
> >To: tomcat-user@jakarta.apache.org
> >Subject: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener
> in
> >general)
> >
> >All,
> >
> >When I attempt to access the HttpSession object within the 
> >sessionDestroyed(), I get the following error.
> >
> >DEBUG [StandardManager[]] (SessionListener.java:40) -
> sessionDestroyed()
> >StandardManager[] Session event listener threw exception
> >java.lang.IllegalStateException: getAttribute: Session already
> invalidated
> >        at 
> >org.apache.catalina.session.StandardSession.getAttribute(StandardSess
> >io
> n.ja
> >v
> >a:954)
> >        at 
> >org.apache.catalina.session.StandardSessionFacade.getAttribute(Standa
> >rd
> Sess
> >i
> >onFacade.java:171)
> >        at
> >dollars.ui.actions.DollarsAction.getUserVO(DollarsAction.java:46)
> >        at 
> >dollars.ui.controllers.SessionListener.sessionDestroyed(SessionListen
> >er
> .jav
> >a
> >:42)
> >        at 
> >org.apache.catalina.session.StandardSession.expire(StandardSession.ja
> >va
> :659
> >)
> >        at 
> >org.apache.catalina.session.StandardSession.expire(StandardSession.ja
> >va
> :608
> >)
> >        at 
> >org.apache.catalina.session.StandardManager.processExpires(StandardMa
> >na
> ger.
> >j
> >ava:793)
> >        at 
> >org.apache.catalina.session.StandardManager.run(StandardManager.java:
> >87
> 0)
> >        at java.lang.Thread.run(Thread.java:536)
> >
> >Why would the HttpSessionEvent *seem* like it should have access to 
> >the session that has just been removed, yet not be able to access it?  
> >Is
> this
> >a
> >Tomcat problem, or does the Servlet 2.3 spec simply want you to know
> that
> >some random session was just invalidated, but you can't get any
> information
> >about it.
> >
> >Any help appreciated.
> >
> >Lukas
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> 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@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message