@Override protected BoundBeanStore createRequestBeanStore(NamingScheme namingScheme, HttpServletRequest request) { return new LazySessionBeanStore(request, namingScheme, false, getServiceRegistry()); }
@Override protected HttpSession getSession(boolean create) { try { return SessionHolder.getSession(request, create); } catch (IllegalStateException e) { // If container can't create an underlying session, invalidate the // current one detach(); return null; } }
/** * * @param request * @param namingScheme * @param attributeLazyFetchingEnabled */ public LazySessionBeanStore(HttpServletRequest request, NamingScheme namingScheme, boolean attributeLazyFetchingEnabled, ServiceRegistry serviceRegistry) { super(namingScheme, attributeLazyFetchingEnabled, serviceRegistry); this.request = request; ContextLogger.LOG.loadingBeanStoreMapFromSession(this, getSession(false)); }
@Override protected BoundBeanStore createRequestBeanStore(NamingScheme namingScheme, HttpServletRequest request) { return new LazySessionBeanStore(request, namingScheme, false, getServiceRegistry()); }
/** * * @param request * @param namingScheme * @param attributeLazyFetchingEnabled */ public LazySessionBeanStore(HttpServletRequest request, NamingScheme namingScheme, boolean attributeLazyFetchingEnabled, ServiceRegistry serviceRegistry) { super(namingScheme, attributeLazyFetchingEnabled, serviceRegistry); this.request = request; ContextLogger.LOG.loadingBeanStoreMapFromSession(this, getSession(false)); }
@Override protected HttpSession getSession(boolean create) { try { return SessionHolder.getSession(request, create); } catch (IllegalStateException e) { // If container can't create an underlying session, invalidate the // current one detach(); return null; } }
@Override protected BoundBeanStore createRequestBeanStore(NamingScheme namingScheme, HttpServletRequest request) { return new LazySessionBeanStore(request, namingScheme, false, getServiceRegistry()); }
/** * * @param request * @param namingScheme * @param attributeLazyFetchingEnabled */ public LazySessionBeanStore(HttpServletRequest request, NamingScheme namingScheme, boolean attributeLazyFetchingEnabled, ServiceRegistry serviceRegistry) { super(namingScheme, attributeLazyFetchingEnabled, serviceRegistry); this.request = request; ContextLogger.LOG.loadingBeanStoreMapFromSession(this, getSession(false)); }
@Override protected HttpSession getSession(boolean create) { try { return SessionHolder.getSession(request, create); } catch (IllegalStateException e) { // If container can't create an underlying session, invalidate the // current one detach(); return null; } }
public boolean associate(HttpServletRequest request) { // At this point the bean store should never be set - see also HttpContextLifecycle.nestedInvocationGuard if (getBeanStore() != null) { ContextLogger.LOG.beanStoreLeakDuringAssociation(this.getClass().getName(), request); } // We always associate a new bean store to avoid possible leaks (security threats) setBeanStore(new LazySessionBeanStore(request, namingScheme, getServiceRegistry().getRequired(WeldConfiguration.class).getBooleanProperty( ConfigurationKey.CONTEXT_ATTRIBUTES_LAZY_FETCH), getServiceRegistry())); checkBeanIdentifierIndexConsistency(request); return true; }
public boolean associate(HttpServletRequest request) { // At this point the bean store should never be set - see also HttpContextLifecycle.nestedInvocationGuard if (getBeanStore() != null) { ContextLogger.LOG.beanStoreLeakDuringAssociation(this.getClass().getName(), request); } // We always associate a new bean store to avoid possible leaks (security threats) setBeanStore(new LazySessionBeanStore(request, namingScheme, getServiceRegistry().getRequired(WeldConfiguration.class).getBooleanProperty( ConfigurationKey.CONTEXT_ATTRIBUTES_LAZY_FETCH), getServiceRegistry())); checkBeanIdentifierIndexConsistency(request); return true; }
public boolean associate(HttpServletRequest request) { // At this point the bean store should never be set - see also HttpContextLifecycle.nestedInvocationGuard if (getBeanStore() != null) { ContextLogger.LOG.beanStoreLeakDuringAssociation(this.getClass().getName(), request); } // We always associate a new bean store to avoid possible leaks (security threats) setBeanStore(new LazySessionBeanStore(request, namingScheme, getServiceRegistry().getRequired(WeldConfiguration.class).getBooleanProperty( ConfigurationKey.CONTEXT_ATTRIBUTES_LAZY_FETCH), getServiceRegistry())); checkBeanIdentifierIndexConsistency(request); return true; }