Class WebSphereExtendedJtaPlatform.TransactionManagerAdapter.TransactionAdapter
java.lang.Object
org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform.TransactionManagerAdapter.TransactionAdapter
- All Implemented Interfaces:
Transaction
- Enclosing class:
- WebSphereExtendedJtaPlatform.TransactionManagerAdapter
public class WebSphereExtendedJtaPlatform.TransactionManagerAdapter.TransactionAdapter
extends Object
implements Transaction
-
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()Complete the transaction represented by this Transaction object.booleandelistResource(XAResource resource, int i) Disassociate the resource specified from the transaction associated with the target Transaction object.booleanenlistResource(XAResource resource) Enlist the resource specified with the transaction associated with the target Transaction object.booleanintObtain the status of the transaction associated with the target Transaction object.inthashCode()voidregisterSynchronization(Synchronization synchronization) Register a synchronization object for the transaction currently associated with the target object.voidrollback()Rollback the transaction represented by this Transaction object.voidModify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction.
-
Method Details
-
registerSynchronization
public void registerSynchronization(Synchronization synchronization) throws RollbackException, IllegalStateException, SystemException Description copied from interface:TransactionRegister a synchronization object for the transaction currently associated with the target object. The transction manager invokes the beforeCompletion method prior to starting the two-phase transaction commit process. After the transaction is completed, the transaction manager invokes the afterCompletion method.- Specified by:
registerSynchronizationin interfaceTransaction- Parameters:
synchronization- The Synchronization object for the transaction associated with the target object.- Throws:
RollbackException- Thrown to indicate that the transaction has been marked for rollback only.IllegalStateException- Thrown if the transaction in the target object is in the prepared state or the transaction is inactive.SystemException- Thrown if the transaction manager encounters an unexpected error condition.
-
hashCode
public int hashCode() -
equals
-
commit
Description copied from interface:TransactionComplete the transaction represented by this Transaction object.- Specified by:
commitin interfaceTransaction- Throws:
UnsupportedOperationException
-
delistResource
Description copied from interface:TransactionDisassociate the resource specified from the transaction associated with the target Transaction object.- Specified by:
delistResourcein interfaceTransaction- Parameters:
resource- The XAResource object associated with the resource (connection).i- One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL.- Returns:
- true if the resource was delisted successfully; otherwise false.
- Throws:
UnsupportedOperationException
-
enlistResource
Description copied from interface:TransactionEnlist the resource specified with the transaction associated with the target Transaction object.- Specified by:
enlistResourcein interfaceTransaction- Parameters:
resource- The XAResource object associated with the resource (connection).- Returns:
- true if the resource was enlisted successfully; otherwise false.
- Throws:
UnsupportedOperationException
-
getStatus
public int getStatus()Description copied from interface:TransactionObtain the status of the transaction associated with the target Transaction object.- Specified by:
getStatusin interfaceTransaction- Returns:
- The transaction status. If no transaction is associated with the target object, this method returns the Status.NoTransaction value.
-
rollback
Description copied from interface:TransactionRollback the transaction represented by this Transaction object.- Specified by:
rollbackin interfaceTransaction- Throws:
UnsupportedOperationException
-
setRollbackOnly
Description copied from interface:TransactionModify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction.- Specified by:
setRollbackOnlyin interfaceTransaction- Throws:
UnsupportedOperationException
-