]
The Transaction interface allows operations to be performed against
the transaction in the target Transaction object. A Transaction
object is created corresponding to each global transaction creation.
The Transaction object can be used for resource enlistment,
synchronization registration, transaction completion, and status
query operations.
| Method from javax.transaction.Transaction Detail: |
public void commit() throws SystemException, SecurityException, RollbackException, IllegalStateException, HeuristicRollbackException, HeuristicMixedException
Complete the transaction represented by this Transaction object. |
public boolean delistResource(XAResource xaRes,
int flag) throws SystemException, IllegalStateException
Disassociate the resource specified from the transaction associated
with the target Transaction object. |
public boolean enlistResource(XAResource xaRes) throws SystemException, RollbackException, IllegalStateException
Enlist the resource specified with the transaction associated with the
target Transaction object. |
public int getStatus() throws SystemException
Obtain the status of the transaction associated with the target
Transaction object. |
public void registerSynchronization(Synchronization sync) throws SystemException, RollbackException, IllegalStateException
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. |
public void rollback() throws SystemException, IllegalStateException
Rollback the transaction represented by this Transaction object. |
public void setRollbackOnly() throws SystemException, IllegalStateException
Modify the transaction associated with the target object such that
the only possible outcome of the transaction is to roll back the
transaction. |