@Override protected BoundBeanStore createSessionBeanStore(NamingScheme namingScheme, HttpSession session) { return new EagerSessionBeanStore(namingScheme, session, getServiceRegistry()); }
@Override protected Object getSessionAttribute(HttpServletRequest request, String name, boolean create) { if (create || SessionHolder.getSessionIfExists() != null) { return getSessionFromRequest(request, true).getAttribute(name); } else { return null; } }
@Override protected void initialize(String cid) { this.initialized.set(Boolean.TRUE); super.initialize(cid); }
@Override public boolean destroy(HttpSession session) { if (isAssociated()) { checkContextInitialized(); } return super.destroy(session); }
@Override public void activate() { if (!isAssociated()) { throw ConversationLogger.LOG.mustCallAssociateBeforeActivate(); } if (!isActive()) { super.setActive(true); } else { ConversationLogger.LOG.contextAlreadyActive(getRequest()); } // Reset the initialized flag - a thread which is not cleaned up properly (e.g. async processing on // Tomcat) may break the lazy initialization otherwise this.initialized.set(null); }
@Override public void deactivate() { try { if (isInitialized()) { try { super.deactivate(); } finally { this.initialized.set(null); } } else { // Only deactivate the context, i.e. remove state threadlocal removeState(); } } finally { this.transientConversationInitializationCallback.set(null); } }
@Override public boolean destroy(HttpSession session) { if (isAssociated()) { checkContextInitialized(); } return super.destroy(session); }
@Override public void activate() { if (!isAssociated()) { throw ConversationLogger.LOG.mustCallAssociateBeforeActivate(); } if (!isActive()) { super.setActive(true); } else { ConversationLogger.LOG.contextAlreadyActive(getRequest()); } // Reset the initialized flag - a thread which is not cleaned up properly (e.g. async processing on // Tomcat) may break the lazy initialization otherwise this.initialized.set(null); }
@Override public void deactivate() { try { if (isInitialized()) { try { super.deactivate(); } finally { this.initialized.set(null); } } else { // Only deactivate the context, i.e. remove state threadlocal removeState(); } } finally { this.transientConversationInitializationCallback.set(null); } }
@Override protected void setSessionAttribute(HttpServletRequest request, String name, Object value, boolean create) { if (create || SessionHolder.getSessionIfExists() != null) { getSessionFromRequest(request, true).setAttribute(name, value); } }
@Override protected BoundBeanStore createRequestBeanStore(NamingScheme namingScheme, HttpServletRequest request) { return new LazySessionBeanStore(request, namingScheme, false, getServiceRegistry()); }
@Override protected void initialize(String cid) { this.initialized.set(Boolean.TRUE); super.initialize(cid); }
@Override public boolean destroy(HttpSession session) { if (isAssociated()) { checkContextInitialized(); } return super.destroy(session); }
@Override public void activate() { if (!isAssociated()) { throw ConversationLogger.LOG.mustCallAssociateBeforeActivate(); } if (!isActive()) { super.setActive(true); } else { ConversationLogger.LOG.contextAlreadyActive(getRequest()); } // Reset the initialized flag - a thread which is not cleaned up properly (e.g. async processing on // Tomcat) may break the lazy initialization otherwise this.initialized.set(null); }
@Override public void deactivate() { try { if (isInitialized()) { try { super.deactivate(); } finally { this.initialized.set(null); } } else { // Only deactivate the context, i.e. remove state threadlocal removeState(); } } finally { this.transientConversationInitializationCallback.set(null); } }
@Override protected void setSessionAttribute(HttpServletRequest request, String name, Object value, boolean create) { if (create || SessionHolder.getSessionIfExists() != null) { getSessionFromRequest(request, true).setAttribute(name, value); } }
@Override protected BoundBeanStore createSessionBeanStore(NamingScheme namingScheme, HttpSession session) { return new EagerSessionBeanStore(namingScheme, session, getServiceRegistry()); }
@Override protected void initialize(String cid) { this.initialized.set(Boolean.TRUE); super.initialize(cid); }
@Override protected Object getSessionAttribute(HttpServletRequest request, String name, boolean create) { if (create || SessionHolder.getSessionIfExists() != null) { return getSessionFromRequest(request, true).getAttribute(name); } else { return null; } }
@Override protected BoundBeanStore createRequestBeanStore(NamingScheme namingScheme, HttpServletRequest request) { return new LazySessionBeanStore(request, namingScheme, false, getServiceRegistry()); }