public class TransactionService
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
javax.transaction.UserTransaction |
begin()
This method begins the transaction and returns the user transaction associated
with the transaction.
|
javax.transaction.UserTransaction |
begin(int timeOut)
This method begins the transaction and return the user transaction associated
with the transaction.
|
static TransactionService |
getInstance()
This method returns the transaction service instance associated with the application.
|
public static TransactionService getInstance()
public javax.transaction.UserTransaction begin()
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
javax.transaction.NotSupportedException - Thrown if the thread is already associated with a transaction and the Transaction Manager
implementation does not support nested transactions.javax.transaction.SystemException - Thrown if the transaction manager encounters an unexpected error condition.public javax.transaction.UserTransaction begin(int timeOut)
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
timeOut - The transaction time out value that overrides the application's default
transaction timeout.javax.transaction.NotSupportedException - Thrown if the thread is already associated with a transaction and the Transaction Manager
implementation does not support nested transactions.javax.transaction.SystemException - Thrown if the transaction manager encounters an unexpected error condition.