Class ManagedTransactionAdapter
java.lang.Object
org.springframework.transaction.jta.ManagedTransactionAdapter
- All Implemented Interfaces:
Transaction
Adapter for a managed JTA Transaction handle, taking a JTA
TransactionManager reference and creating
a JTA Transaction handle for it.- Since:
- 3.0.2
- Author:
- Juergen Hoeller
-
Constructor Summary
ConstructorsConstructorDescriptionManagedTransactionAdapter(TransactionManager transactionManager) Create a new ManagedTransactionAdapter for the given TransactionManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()booleandelistResource(XAResource xaRes, int flag) booleanenlistResource(XAResource xaRes) intfinal TransactionManagerReturn the JTA TransactionManager that this adapter delegates to.voidvoidrollback()void
-
Constructor Details
-
ManagedTransactionAdapter
Create a new ManagedTransactionAdapter for the given TransactionManager.- Parameters:
transactionManager- the JTA TransactionManager to wrap- Throws:
SystemException
-
-
Method Details
-
getTransactionManager
Return the JTA TransactionManager that this adapter delegates to. -
commit
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException- Specified by:
commitin interfaceTransaction- Throws:
RollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSecurityExceptionSystemException
-
rollback
- Specified by:
rollbackin interfaceTransaction- Throws:
SystemException
-
setRollbackOnly
- Specified by:
setRollbackOnlyin interfaceTransaction- Throws:
SystemException
-
getStatus
- Specified by:
getStatusin interfaceTransaction- Throws:
SystemException
-
enlistResource
- Specified by:
enlistResourcein interfaceTransaction- Throws:
RollbackExceptionSystemException
-
delistResource
- Specified by:
delistResourcein interfaceTransaction- Throws:
SystemException
-
registerSynchronization
- Specified by:
registerSynchronizationin interfaceTransaction- Throws:
RollbackExceptionSystemException
-