Save This Page
Home » openjdk-7 » javax » transaction » [javadoc | source]
javax.transaction
public interface: TransactionManager [javadoc | source] The TransactionManager interface defines the methods that allow an application server to manage transaction boundaries.
Method from javax.transaction.TransactionManager Summary:
begin,   commit,   getStatus,   getTransaction,   resume,   rollback,   setRollbackOnly,   setTransactionTimeout,   suspend
Method from javax.transaction.TransactionManager Detail:
 public  void begin() throws NotSupportedException, SystemException
    Create a new transaction and associate it with the current thread.
 public  void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
    Complete the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.
 public int getStatus() throws SystemException
    Obtain the status of the transaction associated with the current thread.
 public Transaction getTransaction() throws SystemException
    Get the transaction object that represents the transaction context of the calling thread.
 public  void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException
    Resume the transaction context association of the calling thread with the transaction represented by the supplied Transaction object. When this method returns, the calling thread is associated with the transaction context specified.
 public  void rollback() throws IllegalStateException, SecurityException, SystemException
    Roll back the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.
 public  void setRollbackOnly() throws IllegalStateException, SystemException
    Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
 public  void setTransactionTimeout(int seconds) throws SystemException
    Modify the timeout value that is associated with transactions started by the current thread with the begin method.

    If an application has not called this method, the transaction service uses some default value for the transaction timeout.

 public Transaction suspend() throws SystemException
    Suspend the transaction currently associated with the calling thread and return a Transaction object that represents the transaction context being suspended. If the calling thread is not associated with a transaction, the method returns a null object reference. When this method returns, the calling thread is not associated with a transaction.