@ApplicationScoped public class NarayanaTransactionManager extends DelegatingTransactionManager
DelegatingTransactionManager in application scope that uses the return value
that results from invoking the JTAEnvironmentBean.getTransactionManager() method as its backing
implementation.JTAEnvironmentBean.getTransactionManager()| Constructor and Description |
|---|
NarayanaTransactionManager(JTAEnvironmentBean jtaEnvironmentBean,
Event<Transaction> transactionScopeInitializedBroadcaster,
Event<Object> transactionScopeDestroyedBroadcaster)
Creates a new
NarayanaTransactionManager. |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Overrides
DelegatingTransactionManager.begin() to
additionally fire an Object representing the initialization
of the transaction scope. |
void |
commit()
Overrides
DelegatingTransactionManager.commit() to
additionally fire an Object representing the destruction
of the transaction scope. |
void |
rollback()
Overrides
DelegatingTransactionManager.rollback() to
additionally fire an Object representing the destruction
of the transaction scope. |
getStatus, getTransaction, resume, setRollbackOnly, setTransactionTimeout, suspend@Inject public NarayanaTransactionManager(JTAEnvironmentBean jtaEnvironmentBean, @Initialized(value=javax.transaction.TransactionScoped.class) Event<Transaction> transactionScopeInitializedBroadcaster, @Destroyed(value=javax.transaction.TransactionScoped.class) Event<Object> transactionScopeDestroyedBroadcaster)
NarayanaTransactionManager.jtaEnvironmentBean - a JTAEnvironmentBean used to
acquire this NarayanaTransactionManager's delegate; must
not be nulltransactionScopeInitializedBroadcaster - an Event
capable of firing Transaction instances; may be nulltransactionScopeDestroyedBroadcaster - an Event
capable of firing Object
instances; may be nullNullPointerException - if jtaEnvironmentBean is
nullbegin(),
commit(),
rollback()public void begin() throws NotSupportedException, SystemException
DelegatingTransactionManager.begin() to
additionally fire an Object representing the initialization
of the transaction scope.begin in interface TransactionManagerbegin in class DelegatingTransactionManagerNotSupportedException - if the thread is already
associated with a transaction and this TransactionManager
implementation does not support nested transactionsSystemException - if this TransactionManager
encounters an unexpected error conditionDelegatingTransactionManager.begin(),
Event.fire(Object),
Initialized,
TransactionScopedpublic void commit() throws HeuristicMixedException, HeuristicRollbackException, RollbackException, SystemException
DelegatingTransactionManager.commit() to
additionally fire an Object representing the destruction
of the transaction scope.commit in interface TransactionManagercommit in class DelegatingTransactionManagerRollbackException - if the transaction has been rolled
back rather than committedHeuristicMixedException - if a heuristic decision was
made and that some relevant updates have been committed while
others have been rolled backHeuristicRollbackException - if a heuristic decision was
made and all relevant updates have been rolled backSecurityException - if the thread is not allowed to
commit the transactionIllegalStateException - if the current thread is not
associated with a transactionSystemException - if this TransactionManager
encounters an unexpected error conditionDelegatingTransactionManager.commit(),
Event.fire(Object),
Destroyed,
TransactionScopedpublic void rollback() throws SystemException
DelegatingTransactionManager.rollback() to
additionally fire an Object representing the destruction
of the transaction scope.rollback in interface TransactionManagerrollback in class DelegatingTransactionManagerSecurityException - if the thread is not allowed to roll
back the transactionIllegalStateException - if the current thread is not
associated with a transactionSystemException - if this TransactionManager
encounters an unexpected error conditionDelegatingTransactionManager.rollback(),
Event.fire(Object),
Destroyed,
TransactionScopedCopyright © 2018–2019, microBean. All rights reserved.