public class ELContextStore extends Object
Dependent
objects of the same
invocation. See spec section 6.4.3. Dependent pseudo-scope and Unified EL.
This gets cleaned up with destroyDependents()
after the whole Expression
got scanned.
NormalScopedBeanInterceptorHandler
for each and every EL call is very expensive. This needs to be cleaned up with
destroyELContextStore()
at the end of each request.
Modifier and Type | Method and Description |
---|---|
void |
addDependent(javax.enterprise.inject.spi.Bean<?> bean,
Object dependent,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
Add a @Dependent scoped bean for later use in the same EL.
|
void |
addNormalScoped(String beanName,
Object contextualInstance)
We cache resolved @NormalScoped bean proxies on the same for speeding up EL.
|
void |
destroyDependents()
This method have to be called after the EL parsing to cleanup the cache
for @Dependent scoped beans.
|
void |
destroyELContextStore()
This needs to be called at the end of each request.
|
Object |
findBeanByName(String name) |
Object |
getDependent(javax.enterprise.inject.spi.Bean<?> bean) |
static ELContextStore |
getInstance(boolean createIfNotExist) |
public static ELContextStore getInstance(boolean createIfNotExist)
createIfNotExist
- if false
doesn't create a new ELContextStore if none existspublic void addDependent(javax.enterprise.inject.spi.Bean<?> bean, Object dependent, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
bean
- dependent
- creationalContext
- public Object getDependent(javax.enterprise.inject.spi.Bean<?> bean)
bean
- null
addDependent(Bean, Object, CreationalContext)
public void addNormalScoped(String beanName, Object contextualInstance)
beanName
- public void destroyDependents()
public void destroyELContextStore()
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.