javax.transaction
Interface Transaction

All Known Implementing Classes:
TransactionImpl

public interface Transaction

The transaction interface. Transactions are normally associated with a single thread.


Method Summary
 void commit()
          Commits the transaction.
 boolean delistResource(XAResource xaRes, int flag)
          Delists a resource from the transaction.
 boolean enlistResource(XAResource xaRes)
          Enlists a resource with the transaction.
 int getStatus()
          Returns the transaction's status.
 void registerSynchronization(Synchronization sync)
          Registers a synchronization.
 void rollback()
          Rolls the transaction back.
 void setRollbackOnly()
          Marks the transaction as rollback only.
 

Method Detail

getStatus

int getStatus()
              throws SystemException
Returns the transaction's status.

Throws:
SystemException

enlistResource

boolean enlistResource(XAResource xaRes)
                       throws java.lang.IllegalStateException,
                              RollbackException,
                              SystemException
Enlists a resource with the transaction.

Throws:
java.lang.IllegalStateException
RollbackException
SystemException

delistResource

boolean delistResource(XAResource xaRes,
                       int flag)
                       throws java.lang.IllegalStateException,
                              SystemException
Delists a resource from the transaction.

Throws:
java.lang.IllegalStateException
SystemException

registerSynchronization

void registerSynchronization(Synchronization sync)
                             throws java.lang.IllegalStateException,
                                    RollbackException,
                                    SystemException
Registers a synchronization.

Throws:
java.lang.IllegalStateException
RollbackException
SystemException

setRollbackOnly

void setRollbackOnly()
                     throws java.lang.IllegalStateException,
                            SystemException
Marks the transaction as rollback only.

Throws:
java.lang.IllegalStateException
SystemException

commit

void commit()
            throws java.lang.IllegalStateException,
                   RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   java.lang.SecurityException,
                   SystemException
Commits the transaction.

Throws:
java.lang.IllegalStateException
RollbackException
HeuristicMixedException
HeuristicRollbackException
java.lang.SecurityException
SystemException

rollback

void rollback()
              throws java.lang.IllegalStateException,
                     SystemException
Rolls the transaction back.

Throws:
java.lang.IllegalStateException
SystemException