@Retention(value=RUNTIME) @Target(value={TYPE,METHOD,FIELD}) @NormalScope(passivating=true) public @interface TransactionScoped
UserTransaction.getStatus
or
TransactionManager.getStatus
is one of the following states:
Synchronization.beforeCompletion
methods are called and
after completion calls have been made on enlisted resources.
Synchronization.afterCompletion
calls may occur before
the transaction context is destroyed, however, there is no guarantee.
A javax.enterprise.context.ContextNotActiveException
will be thrown if an object with this annotation is used when the
transaction context is not active.
The object with this annotation is associated with the JTA transaction where
it is first used and this association is retained through any transaction
suspend or resume calls as well as any beforeCompletion Synchronization
calls until the transaction is completed.
The way in which the JTA transaction is begun and completed
(eg BMT, CMT, etc.) is of no consequence.
The contextual references used across different JTA transactions are
distinct.Copyright © 2013. All Rights Reserved.