@Override protected BoundBeanStore createSessionBeanStore(NamingScheme namingScheme, HttpSession session) { return new EagerSessionBeanStore(namingScheme, session, getServiceRegistry()); }
public EagerSessionBeanStore(NamingScheme namingScheme, HttpSession session, ServiceRegistry serviceRegistry) { super(namingScheme, false, serviceRegistry); this.session = session; ContextLogger.LOG.loadingBeanStoreMapFromSession(this, getSession(false)); }
@Override protected BoundBeanStore createSessionBeanStore(NamingScheme namingScheme, HttpSession session) { return new EagerSessionBeanStore(namingScheme, session, getServiceRegistry()); }
public EagerSessionBeanStore(NamingScheme namingScheme, HttpSession session, ServiceRegistry serviceRegistry) { super(namingScheme, false, serviceRegistry); this.session = session; ContextLogger.LOG.loadingBeanStoreMapFromSession(this, getSession(false)); }
@Override protected BoundBeanStore createSessionBeanStore(NamingScheme namingScheme, HttpSession session) { return new EagerSessionBeanStore(namingScheme, session, getServiceRegistry()); }
public EagerSessionBeanStore(NamingScheme namingScheme, HttpSession session, ServiceRegistry serviceRegistry) { super(namingScheme, false, serviceRegistry); this.session = session; ContextLogger.LOG.loadingBeanStoreMapFromSession(this, getSession(false)); }
@Override public boolean associate(HttpSession session) { if (getBeanStore() == null) { // Don't reassociate setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); return true; } else { return false; } }
@Override public boolean associate(HttpSession session) { if (getBeanStore() == null) { // Don't reassociate setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); return true; } else { return false; } }
@Override public boolean associate(HttpSession session) { if (getBeanStore() == null) { // Don't reassociate setBeanStore(new EagerSessionBeanStore(namingScheme, session, getServiceRegistry())); return true; } else { return false; } }
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; } }
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; } }
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; } }