| javax.transaction.UserTransaction
UserTransaction | public interface UserTransaction (Code) | | This interface allows an application to explicitly manage transactions.
version: $Revision: 57196 $ |
Method Summary | |
public void | begin() Starts a new transaction, and associate it with the calling thread. | public void | commit() Commit the transaction associated with the calling thread. | public int | getStatus() Get the status of the transaction associated with the calling thread.
The status of the transaction. | public void | rollback() Rolls back the transaction associated with the calling thread.
throws: IllegalStateException - If the transaction is in a statewhere it cannot be rolled back. | public void | setRollbackOnly() Mark the transaction associated with the calling thread for rollback
only.
throws: IllegalStateException - If the transaction is in a statewhere it cannot be rolled back. | public void | setTransactionTimeout(int seconds) Change the transaction timeout for transactions started by the calling
thread with the
UserTransaction.begin() method.
Parameters: seconds - The new timeout value, in seconds. |
getStatus | public int getStatus() throws SystemException(Code) | | Get the status of the transaction associated with the calling thread.
The status of the transaction. This is one of theStatus constants. If no transaction is associatedwith the calling thread,Status.STATUS_NO_TRANSACTION is returned. throws: SystemException - If the transaction service fails in anunexpected way. |
setTransactionTimeout | public void setTransactionTimeout(int seconds) throws SystemException(Code) | | Change the transaction timeout for transactions started by the calling
thread with the
UserTransaction.begin() method.
Parameters: seconds - The new timeout value, in seconds. If this parameteris 0 , the timeout value is reset to the defaultvalue. throws: SystemException - If the transaction service fails in anunexpected way. |
|
|