]
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 RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
Complete the transaction represented by this Transaction object. |
public boolean delistResource(XAResource xaRes,
int flag) throws IllegalStateException, SystemException
Disassociate the resource specified from the transaction associated
with the target Transaction object. |
public boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException
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 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. |
public void rollback() throws IllegalStateException, SystemException
Rollback the transaction represented by this Transaction object. |
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. |