Search in sources :

Example 1 with RequestBeanStore

use of org.jboss.weld.module.web.context.beanstore.http.RequestBeanStore in project core by weld.

the class HttpRequestContextImpl method associate.

public boolean associate(HttpServletRequest request) {
    // At this point the bean store should never be set - see also HttpContextLifecycle#nestedInvocationGuard
    BoundBeanStore beanStore = getBeanStore();
    if (beanStore != null) {
        ContextLogger.LOG.beanStoreLeakDuringAssociation(this.getClass().getName(), request);
        if (ContextLogger.LOG.isDebugEnabled()) {
            ContextLogger.LOG.beanStoreLeakAffectedBeanIdentifiers(this.getClass().getName(), Iterables.toMultiRowString(beanStore));
        }
    }
    // We always associate a new bean store to avoid possible leaks (security threats)
    beanStore = new RequestBeanStore(request, namingScheme);
    setBeanStore(beanStore);
    beanStore.attach();
    return true;
}
Also used : RequestBeanStore(org.jboss.weld.module.web.context.beanstore.http.RequestBeanStore) BoundBeanStore(org.jboss.weld.contexts.beanstore.BoundBeanStore)

Aggregations

BoundBeanStore (org.jboss.weld.contexts.beanstore.BoundBeanStore)1 RequestBeanStore (org.jboss.weld.module.web.context.beanstore.http.RequestBeanStore)1