public class TransactionScopedContextImpl extends Object implements javax.enterprise.context.spi.Context
TransactionScoped
beans.
The contextual instances are destroyed when the transaction completes.
Any attempt to call a method on a TransactionScoped
bean when a transaction is not active
will result in a .
A CDI Event: @Initialized(TransactionScoped.class) is fired with
TransactionScopedCDIEventPayload
, when the context is initialized for the first time
and @Destroyed(TransactionScoped.class) is fired with TransactionScopedCDIEventPayload
,
when the context is destroyed at the end. Currently this payload is empty i.e. it doesn't contain
any information.Modifier and Type | Field and Description |
---|---|
static String |
TRANSACTION_SYNCHRONIZATION_REGISTRY_JNDI_NAME |
Constructor and Description |
---|
TransactionScopedContextImpl() |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(javax.enterprise.context.spi.Contextual<T> contextual) |
<T> T |
get(javax.enterprise.context.spi.Contextual<T> contextual,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
ConcurrentHashMap<TransactionSynchronizationRegistry,Set<TransactionScopedBean>> |
getBeansPerTransaction() |
Class<? extends Annotation> |
getScope() |
boolean |
isActive() |
public static final String TRANSACTION_SYNCHRONIZATION_REGISTRY_JNDI_NAME
public ConcurrentHashMap<TransactionSynchronizationRegistry,Set<TransactionScopedBean>> getBeansPerTransaction()
public Class<? extends Annotation> getScope()
getScope
in interface javax.enterprise.context.spi.Context
public <T> T get(javax.enterprise.context.spi.Contextual<T> contextual, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
get
in interface javax.enterprise.context.spi.Context
public <T> T get(javax.enterprise.context.spi.Contextual<T> contextual)
get
in interface javax.enterprise.context.spi.Context
public boolean isActive()
isActive
in interface javax.enterprise.context.spi.Context
Copyright © 2018. All rights reserved.