|
|
|
The current jsr154 maintenance release 3 contains a change in the getId() method of the HttpSession class, page 273:
getId() public java.lang.String getId() Returns a string containing the unique identifier assigned to this session. The identifier is assigned by the servlet container and is implementation dependent. Returns: a string specifying the identifier assigned to this session Throws: IllegalStateException - if this method is called on an invalidated session http://jcp.org/aboutJava/communityprocess/maintenance/jsr154/index3.html http://jcp.org/aboutJava/communityprocess/maintenance/jsr154/servlet-2_5-changelog.html I think that even spec. 2.4 is affected. There was just a typo in the original specification which was fixed by the errate document I mentioned above. here another link that makes mor eobvious that the errata file belongs to spec 2.4:
http://jcp.org/aboutJava/communityprocess/maintenance/jsr154/JSR154ChangeLog.html Search for "Fix typos in HttpSession" And I really want to emphasize the severity of this issue: Calling session.invalidate() simply does not work with Tomcat 5.5.12 and OSCache2.2. The Tomcat guys won't change catalina as it is compliant to the specs (I have currently patched Tomcat, but that is not a good thing of course) I would think about backporting this independence from calling getId() feature to OSCache 2.2.x Christian, for a workaround you should use warn level for OSCache in release 2.2 or you can use the current CVS HEAD of OSCache.
| |||||||||||||||||||||||||||||||||||||||||
In release 2.3 we won't access the session's id by invoking HttpSessionBindingEvent event.getSession().getId()
The final Servlet Spec. 2.4 doesn't document that getId() will throw an IllegalStateException when the session is invalidated. This may change with the Servlet Spec. 2.5, so we change the OSCache behaviour.
Taken from Java™ Servlet Specification Version 2.4, page 267:
getId()
public java.lang.String getId()
Returns a string containing the unique identifier assigned to this session. The
identifier is assigned by the servlet container and is implementation dependent.
Returns: a string specifying the identifier assigned to this session