private void activate(HttpConversationContext conversationContext, final HttpServletRequest request) { if (lazy) { conversationContext.activateLazily(lazyInitializationCallback); } else { String cid = determineConversationId(request, conversationContext.getParameterName()); conversationContext.activate(cid); if (cid == null) { // transient conversation conversationInitializedEvent.fire(request); } } }
protected void associateConversationContext(HttpServletRequest request) { httpConversationContext().associate(request); }
private void activate(HttpConversationContext conversationContext, final HttpServletRequest request) { if (lazy && conversationContext instanceof LazyHttpConversationContextImpl) { LazyHttpConversationContextImpl lazyConversationContext = (LazyHttpConversationContextImpl) conversationContext; // Activation API should be improved so that it's possible to pass a callback for later execution lazyConversationContext.activate(lazyInitializationCallback); } else { String cid = determineConversationId(request, conversationContext.getParameterName()); conversationContext.activate(cid); if (cid == null) { // transient conversation conversationInitializedEvent.fire(request); } } }
protected void activateConversationContext(HttpServletRequest request) { HttpConversationContext conversationContext = httpConversationContext(); /* * Don't try to reactivate the ConversationContext if we have already activated it for this request WELD-877 */ if (!isContextActivatedInRequest(request)) { setContextActivatedInRequest(request); activate(conversationContext, request); } else { /* * We may have previously been associated with a ConversationContext, but the reference to that context may have been lost during a Servlet forward * WELD-877 */ conversationContext.dissociate(request); conversationContext.associate(request); activate(conversationContext, request); } }
protected void disassociateConversationContext(HttpServletRequest request) { try { httpConversationContext().dissociate(request); } catch (Exception e) { ServletLogger.LOG.unableToDissociateContext(httpConversationContext(), request); ServletLogger.LOG.catchingDebug(e); } }
public boolean destroy(HttpSession session) { final BoundBeanStore beanStore = getBeanStore(); if (beanStore == null) { try { HttpConversationContext conversationContext = getConversationContext(); setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); activate(); invalidate(); conversationContext.destroy(session); deactivate(); setBeanStore(null); return true; } finally { cleanup(); } } else { // We are in a request, invalidate it invalidate(); if (beanStore instanceof AttributeBeanStore) { AttributeBeanStore attributeBeanStore = ((AttributeBeanStore) beanStore); if (attributeBeanStore.isAttributeLazyFetchingEnabled()) { // At this moment we have to sync the local bean store and the backing store attributeBeanStore.fetchUninitializedAttributes(); } } getConversationContext().destroy(session); return false; } }
protected void activateConversationContext(HttpServletRequest request) { HttpConversationContext conversationContext = httpConversationContext(); /* * Don't try to reactivate the ConversationContext if we have already activated it for this request WELD-877 */ if (!isContextActivatedInRequest(request)) { setContextActivatedInRequest(request); activate(conversationContext, request); } else { /* * We may have previously been associated with a ConversationContext, but the reference to that context may have been lost during a Servlet forward * WELD-877 */ conversationContext.dissociate(request); conversationContext.associate(request); activate(conversationContext, request); } }
protected void disassociateConversationContext(HttpServletRequest request) { try { httpConversationContext().dissociate(request); } catch (Exception e) { ServletLogger.LOG.unableToDissociateContext(httpConversationContext(), request); ServletLogger.LOG.catchingDebug(e); } }
public boolean destroy(HttpSession session) { final BoundBeanStore beanStore = getBeanStore(); if (beanStore == null) { try { HttpConversationContext conversationContext = getConversationContext(); setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); activate(); invalidate(); conversationContext.destroy(session); deactivate(); setBeanStore(null); return true; } finally { cleanup(); } } else { // We are in a request, invalidate it invalidate(); if (beanStore instanceof AttributeBeanStore) { AttributeBeanStore attributeBeanStore = ((AttributeBeanStore) beanStore); if (attributeBeanStore.isAttributeLazyFetchingEnabled()) { // At this moment we have to sync the local bean store and the backing store attributeBeanStore.fetchUninitializedAttributes(); } } getConversationContext().destroy(session); return false; } }
private void activate(HttpConversationContext conversationContext, final HttpServletRequest request) { if (lazy) { conversationContext.activateLazily(lazyInitializationCallback); } else { String cid = determineConversationId(request, conversationContext.getParameterName()); conversationContext.activate(cid); if (cid == null) { // transient conversation conversationInitializedEvent.fire(request); } } }
protected void activateConversationContext(HttpServletRequest request) { HttpConversationContext conversationContext = httpConversationContext(); /* * Don't try to reactivate the ConversationContext if we have already activated it for this request WELD-877 */ if (!isContextActivatedInRequest(request)) { setContextActivatedInRequest(request); activate(conversationContext, request); } else { /* * We may have previously been associated with a ConversationContext, but the reference to that context may have been lost during a Servlet forward * WELD-877 */ conversationContext.dissociate(request); conversationContext.associate(request); activate(conversationContext, request); } }
protected void disassociateConversationContext(HttpServletRequest request) { try { httpConversationContext().dissociate(request); } catch (Exception e) { ServletLogger.LOG.unableToDissociateContext(httpConversationContext(), request); ServletLogger.LOG.catchingDebug(e); } }
protected void associateConversationContext(HttpServletRequest request) { httpConversationContext().associate(request); }
public boolean destroy(HttpSession session) { final BoundBeanStore beanStore = getBeanStore(); if (beanStore == null) { try { HttpConversationContext conversationContext = getConversationContext(); setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); activate(); invalidate(); conversationContext.destroy(session); deactivate(); setBeanStore(null); return true; } finally { cleanup(); } } else { // We are in a request, invalidate it invalidate(); if (beanStore instanceof AttributeBeanStore) { AttributeBeanStore attributeBeanStore = ((AttributeBeanStore) beanStore); if (attributeBeanStore.isAttributeLazyFetchingEnabled()) { // At this moment we have to sync the local bean store and the backing store attributeBeanStore.fetchUninitializedAttributes(); } } getConversationContext().destroy(session); return false; } }
private void activate(HttpConversationContext conversationContext, final HttpServletRequest request) { if (lazy) { conversationContext.activateLazily(lazyInitializationCallback); } else { String cid = determineConversationId(request, conversationContext.getParameterName()); conversationContext.activate(cid); if (cid == null) { // transient conversation conversationInitializedEvent.fire(request); } } }
protected void activateConversationContext(HttpServletRequest request) { HttpConversationContext conversationContext = httpConversationContext(); /* * Don't try to reactivate the ConversationContext if we have already activated it for this request WELD-877 */ if (!isContextActivatedInRequest(request)) { setContextActivatedInRequest(request); activate(conversationContext, request); } else { /* * We may have previously been associated with a ConversationContext, but the reference to that context may have been lost during a Servlet forward * WELD-877 */ conversationContext.dissociate(request); conversationContext.associate(request); activate(conversationContext, request); } }
protected void disassociateConversationContext(HttpServletRequest request) { try { httpConversationContext().dissociate(request); } catch (Exception e) { ServletLogger.LOG.unableToDissociateContext(httpConversationContext(), request); ServletLogger.LOG.catchingDebug(e); } }
protected void associateConversationContext(HttpServletRequest request) { httpConversationContext().associate(request); }
public boolean destroy(HttpSession session) { final BoundBeanStore beanStore = getBeanStore(); if (beanStore == null) { try { HttpConversationContext conversationContext = getConversationContext(); setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); activate(); invalidate(); conversationContext.destroy(session); deactivate(); setBeanStore(null); return true; } finally { cleanup(); } } else { // We are in a request, invalidate it invalidate(); if (beanStore instanceof AttributeBeanStore) { AttributeBeanStore attributeBeanStore = ((AttributeBeanStore) beanStore); if (attributeBeanStore.isAttributeLazyFetchingEnabled()) { // At this moment we have to sync the local bean store and the backing store attributeBeanStore.fetchUninitializedAttributes(); } } getConversationContext().destroy(session); return false; } }
protected void associateConversationContext(HttpServletRequest request) { httpConversationContext().associate(request); }