public class SessionScopedBeanInterceptorHandler extends NormalScopedBeanInterceptorHandler
This is a Provider
especially
made for @SessionScoped beans used in web applications.
Since there is only one single contextual instance of an @SessionScoped bean per thread, we can simply cache this instance inside our bean. We only need to reload this instance if it is null or if the thread ends.
bean
Constructor and Description |
---|
SessionScopedBeanInterceptorHandler(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.spi.Bean<?> bean)
Creates a new handler.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
getContextualInstance() |
static void |
removeThreadLocals() |
get, getBean, getBeanManager, readResolve
public SessionScopedBeanInterceptorHandler(javax.enterprise.inject.spi.BeanManager beanManager, javax.enterprise.inject.spi.Bean<?> bean)
public static void removeThreadLocals()
protected Object getContextualInstance()
getContextualInstance
in class NormalScopedBeanInterceptorHandler
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.