Class WebSphereExtendedJtaPlatform.TransactionManagerAdapter
java.lang.Object
org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform.TransactionManagerAdapter
- All Implemented Interfaces:
TransactionManager
- Enclosing class:
- WebSphereExtendedJtaPlatform
public class WebSphereExtendedJtaPlatform.TransactionManagerAdapter
extends Object
implements TransactionManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Create a new transaction and associate it with the current thread.voidcommit()Complete the transaction associated with the current thread.intObtain the status of the transaction associated with the current thread.Get the transaction object that represents the transaction context of the calling thread.voidresume(Transaction txn) Resume the transaction context association of the calling thread with the transaction represented by the supplied Transaction object.voidrollback()Roll back the transaction associated with the current thread.voidModify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.voidsetTransactionTimeout(int i) Modify the timeout value that is associated with transactions started by the current thread with the begin method.suspend()Suspend the transaction currently associated with the calling thread and return a Transaction object that represents the transaction context being suspended.
-
Method Details
-
begin
Description copied from interface:TransactionManagerCreate a new transaction and associate it with the current thread.- Specified by:
beginin interfaceTransactionManager- Throws:
NotSupportedException- Thrown if the thread is already associated with a transaction and the Transaction Manager implementation does not support nested transactions.SystemException- Thrown if the transaction manager encounters an unexpected error condition.
-
commit
Description copied from interface:TransactionManagerComplete the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.- Specified by:
commitin interfaceTransactionManager- Throws:
UnsupportedOperationException
-
getStatus
Description copied from interface:TransactionManagerObtain the status of the transaction associated with the current thread.- Specified by:
getStatusin interfaceTransactionManager- Returns:
- The transaction status. If no transaction is associated with the current thread, this method returns the Status.NoTransaction value.
- Throws:
SystemException- Thrown if the transaction manager encounters an unexpected error condition.
-
getTransaction
Description copied from interface:TransactionManagerGet the transaction object that represents the transaction context of the calling thread.- Specified by:
getTransactionin interfaceTransactionManager- Returns:
- the
Transactionobject representing the transaction associated with the calling thread. - Throws:
SystemException- Thrown if the transaction manager encounters an unexpected error condition.
-
resume
Description copied from interface:TransactionManagerResume 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.- Specified by:
resumein interfaceTransactionManager- Parameters:
txn- TheTransactionobject that represents the transaction to be resumed.- Throws:
UnsupportedOperationException
-
rollback
Description copied from interface:TransactionManagerRoll back the transaction associated with the current thread. When this method completes, the thread is no longer associated with a transaction.- Specified by:
rollbackin interfaceTransactionManager- Throws:
UnsupportedOperationException
-
setRollbackOnly
Description copied from interface:TransactionManagerModify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.- Specified by:
setRollbackOnlyin interfaceTransactionManager- Throws:
UnsupportedOperationException
-
setTransactionTimeout
Description copied from interface:TransactionManagerModify 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.
- Specified by:
setTransactionTimeoutin interfaceTransactionManager- Parameters:
i- The value of the timeout in seconds. If the value is zero, the transaction service restores the default value. If the value is negative a SystemException is thrown.- Throws:
UnsupportedOperationException
-
suspend
Description copied from interface:TransactionManagerSuspend 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.- Specified by:
suspendin interfaceTransactionManager- Returns:
- Transaction object representing the suspended transaction.
- Throws:
UnsupportedOperationException
-