public class SessionHolder extends Object
HttpServletRequest#getSession(boolean)
cannot be used within
HttpSessionListener#sessionCreated(HttpSession)
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.https://issues.jboss.org/browse/AS7-6428
Modifier and Type | Method and Description |
---|---|
static void |
clear() |
static HttpSession |
getSession(HttpServletRequest request,
boolean create) |
static HttpSession |
getSessionIfExists() |
static void |
requestInitialized(HttpServletRequest request) |
static void |
sessionCreated(HttpSession session) |
public static void requestInitialized(HttpServletRequest request)
public static void sessionCreated(HttpSession session)
public static HttpSession getSessionIfExists()
public static HttpSession getSession(HttpServletRequest request, boolean create)
public static void clear()
Copyright © 2013 Seam Framework. All Rights Reserved.