public class SessionHolder
extends Object
Holds the session associated with the current request.
This utility class was added to work around an incompatibility problem with some Servlet containers (JBoss Web, Tomcat). In
these containers, HttpServletRequest#getSession(boolean) cannot be used within
HttpSessionListener#sessionCreated(HttpSessionEvent) method invocation is the created session is not made available.
As a result either null is returned or a new session is created (possibly causing an endless loop).
This utility class receives an HttpSession once it is created and holds it until the request is destroyed / session
is invalidated.
- Author:
- Jozef Hartinger
- See Also:
https://issues.jboss.org/browse/AS7-6428