jakarta.transaction.TransactionManager reference and creating
a JTA jakarta.transaction.Transaction handle for it.
| Modifier and Type | Field and Description |
|---|---|
| private final TransactionManager |
| Access | Constructor and Description |
|---|---|
| public | ManagedTransactionAdapter(TransactionManager
the JTA TransactionManager to wrap transactionManager)Create a new ManagedTransactionAdapter for the given TransactionManager. |
| Modifier and Type | Method and Description |
|---|---|
| public void | commit()
Implements jakarta. |
| public boolean | delistResource(XAResource
The XAResource object associated with the resource
(connection). xaRes, int One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL. flag)Implements jakarta. |
| public boolean | enlistResource(XAResource
The XAResource object associated with the resource
(connection). xaRes)Implements jakarta. |
| public int | getStatus()
Implements jakarta. |
| public final TransactionManager | |
| public void | registerSynchronization(Synchronization
The Synchronization object for the transaction associated
with the target object. sync)Implements jakarta. |
| public void | rollback()
Implements jakarta. |
| public void | setRollbackOnly()
Implements jakarta. |
| transactionManager | back to summary |
|---|---|
| private final TransactionManager transactionManager | |
| ManagedTransactionAdapter | back to summary |
|---|---|
| public ManagedTransactionAdapter(TransactionManager transactionManager) throws SystemException Create a new ManagedTransactionAdapter for the given TransactionManager.
| |
| commit | back to summary |
|---|---|
| public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException Implements jakarta. Doc from jakarta. Complete the transaction represented by this Transaction object.
| |
| delistResource | back to summary |
|---|---|
| public boolean delistResource(XAResource xaRes, int flag) throws SystemException Implements jakarta. Doc from jakarta. Disassociate the resource specified from the transaction associated with the target Transaction object.
| |
| enlistResource | back to summary |
|---|---|
| public boolean enlistResource(XAResource xaRes) throws RollbackException, SystemException Implements jakarta. Doc from jakarta. Enlist the resource specified with the transaction associated with the target Transaction object.
| |
| getStatus | back to summary |
|---|---|
| public int getStatus() throws SystemException Implements jakarta. Doc from jakarta. Obtain the status of the transaction associated with the target Transaction object.
| |
| getTransactionManager | back to summary |
|---|---|
| public final TransactionManager getTransactionManager() Return the JTA TransactionManager that this adapter delegates to. | |
| registerSynchronization | back to summary |
|---|---|
| public void registerSynchronization(Synchronization sync) throws RollbackException, SystemException Implements jakarta. Doc from jakarta. Register a synchronization object for the transaction currently associated with the target object. The transction manager invokes the beforeCompletion method prior to starting the two-phase transaction commit process. After the transaction is completed, the transaction manager invokes the afterCompletion method.
| |
| rollback | back to summary |
|---|---|
| public void rollback() throws SystemException Implements jakarta. Doc from jakarta. Rollback the transaction represented by this Transaction object.
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws SystemException Implements jakarta. Doc from jakarta. Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction.
| |