Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7Beta1
-
Component/s: Framework
-
Labels:None
-
Environment:Seam 2.0.1.GA, JBoss AS 4.2.2.GA
-
ICEsoft Forum Reference:
Description
calling #{identity.logout} causes an
java.lang.IllegalStateException: invalidate: Session already invalidated
at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1107)
at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.run(SessionDispatcher.java:115)
NOTE. I have narrowed it down to revision 15530 OK, 15540 broken. Primary suspect is checking 15532 "Delay the release of FacesContext as well.ICE-1909"
java.lang.IllegalStateException: invalidate: Session already invalidated
at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1107)
at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.run(SessionDispatcher.java:115)
NOTE. I have narrowed it down to revision 15530 OK, 15540 broken. Primary suspect is checking 15532 "Delay the release of FacesContext as well.
Delaying session invalidation proved to be a bad choice since JBoss+Catalina reuses session objects and IDs which causes a lot of confusion in applications that have logout processes (invalidate session and immediately initiate new session).
Instead session is invalidated right after the session bound servers are shut down.
The change described above broke the fixes for
ICE-1909, because session now is invalidated in the middle of the JSF lifecycle. So, the solution was to detect immediately that the JSF lifecycle was interrupted and respond with a 'session-expired' message right away.