public void sessionDestroyed(HttpSession session) { // Mark the session context and conversation contexts to destroy // instances when appropriate deactivateSessionDestructionContext(session); boolean destroyed = getSessionContext().destroy(session); SessionHolder.clear(); RequestScopedCache.endRequest(); if (destroyed) { // we are outside of a request (the session timed out) and therefore the session was destroyed immediately // we can fire the @Destroyed(SessionScoped.class) event immediately sessionDestroyedEvent.fire(session); } else { // the old session won't be available at the time we destroy this request // let's store its reference until then if (getRequestContext() instanceof HttpRequestContextImpl) { HttpServletRequest request = Reflections.<HttpRequestContextImpl> cast(getRequestContext()).getHttpServletRequest(); request.setAttribute(HTTP_SESSION, session); } } }
public void sessionDestroyed(HttpSession session) { // Mark the session context and conversation contexts to destroy // instances when appropriate deactivateSessionDestructionContext(session); boolean destroyed = getSessionContext().destroy(session); SessionHolder.clear(); RequestScopedCache.endRequest(); if (destroyed) { // we are outside of a request (the session timed out) and therefore the session was destroyed immediately // we can fire the @Destroyed(SessionScoped.class) event immediately sessionDestroyedEvent.fire(session); } else { // the old session won't be available at the time we destroy this request // let's store its reference until then if (getRequestContext() instanceof HttpRequestContextImpl) { HttpServletRequest request = Reflections.<HttpRequestContextImpl> cast(getRequestContext()).getHttpServletRequest(); request.setAttribute(HTTP_SESSION, session); } } }
public void sessionDestroyed(HttpSession session) { // Mark the session context and conversation contexts to destroy // instances when appropriate deactivateSessionDestructionContext(session); boolean destroyed = getSessionContext().destroy(session); SessionHolder.clear(); RequestScopedCache.endRequest(); if (destroyed) { // we are outside of a request (the session timed out) and therefore the session was destroyed immediately // we can fire the @Destroyed(SessionScoped.class) event immediately sessionDestroyedEvent.fire(session); } else { // the old session won't be available at the time we destroy this request // let's store its reference until then if (getRequestContext() instanceof HttpRequestContextImpl) { HttpServletRequest request = Reflections.<HttpRequestContextImpl> cast(getRequestContext()).getHttpServletRequest(); request.setAttribute(HTTP_SESSION, session); } } }
public void sessionDestroyed(HttpSession session) { // Mark the session context and conversation contexts to destroy // instances when appropriate deactivateSessionDestructionContext(session); boolean destroyed = getSessionContext().destroy(session); SessionHolder.clear(); RequestScopedCache.endRequest(); if (destroyed) { // we are outside of a request (the session timed out) and therefore the session was destroyed immediately // we can fire the @Destroyed(SessionScoped.class) event immediately sessionDestroyedEvent.fire(session); } else { // the old session won't be available at the time we destroy this request // let's store its reference until then if (getRequestContext() instanceof HttpRequestContextImpl) { HttpServletRequest request = Reflections.<HttpRequestContextImpl> cast(getRequestContext()).getHttpServletRequest(); request.setAttribute(HTTP_SESSION, session); } } }