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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to