tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durfee, Bernard" <Bernard.Dur...@suny.edu>
Subject session.invalidate() change
Date Thu, 10 Nov 2005 16:23:03 GMT
It seems that Tomcat is handling session.invalidate() differently now. I
have HttpSessionListeners attached to the session, which need the
sessionId to perform some cleanup when they are unbound from the
session. This was no problem, up until Tomcat 5.5 or so. Now I get this
exception...

java.lang.IllegalStateException: getId: Session already invalidated
        at
org.apache.catalina.session.StandardSession.getId(StandardSession.java:3
28)
        at
org.apache.catalina.session.StandardSessionFacade.getId(StandardSessionF
acade.java:78)
        at
org.jasig.portal.jndi.JNDIManager$JNDISessionListener.valueUnbound(JNDIM
anager.java:331)
        at
org.apache.catalina.session.StandardSession.removeAttributeInternal(Stan
dardSession.java:1607)
        at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:
737)
        at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:
643)
        at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.j
ava:1088)
        at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSes
sionFacade.java:149)

...which is caused by the valueUnbound() handler calling
event.getSession().getId(). This worked before. Was this an unintended
change in Tomcat funcationality or is there a change in the spec that
caused this behavior to change? It seems like the session should still
give up at least it's ID to valueUnbound() handlers or maybe the
sessionId should be added to the event itself.

Bernie


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message