| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if the resource was delisted successfully; otherwise false.The XAResource object associated with the resource
(connection). xaRes, int One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL. flag)Disassociate the resource specified from the transaction associated with the target Transaction object. |
| public boolean | Returns: true if the resource was enlisted successfully; otherwise false.The XAResource object associated with the resource
(connection). xaRes)Enlist the resource specified with the transaction associated with the target Transaction object. |
| public int | Returns: The transaction status. If no transaction is associated with the target object, this method returns the Status.NoTransaction value.Obtain the status of the transaction associated with the target Transaction object. |
| public void | registerSynchronization(Synchronization
The Synchronization object for the transaction associated
with the target object. sync)Register a synchronization object for the transaction currently associated with the target object. |
| public void | |
| public void | setRollbackOnly()
Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction. |
| commit | back to summary |
|---|---|
| public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException Complete the transaction represented by this Transaction object.
| |
| delistResource | back to summary |
|---|---|
| public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException Disassociate the resource specified from the transaction associated with the target Transaction object.
| |
| enlistResource | back to summary |
|---|---|
| public boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException Enlist the resource specified with the transaction associated with the target Transaction object.
| |
| getStatus | back to summary |
|---|---|
| public int getStatus() throws SystemException Obtain the status of the transaction associated with the target Transaction object.
| |
| registerSynchronization | back to summary |
|---|---|
| public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException 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 IllegalStateException, SystemException Rollback the transaction represented by this Transaction object.
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws IllegalStateException, SystemException Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction.
| |