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
ConstructorDescriptionManagedTransactionAdapter
(TransactionManager transactionManager) Create a new ManagedTransactionAdapter for the given TransactionManager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
boolean
delistResource
(XAResource xaRes, int flag) boolean
enlistResource
(XAResource xaRes) int
final TransactionManager
Return the JTA TransactionManager that this adapter delegates to.void
void
rollback()
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:
commit
in interfaceTransaction
- Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
SystemException
-
rollback
- Specified by:
rollback
in interfaceTransaction
- Throws:
SystemException
-
setRollbackOnly
- Specified by:
setRollbackOnly
in interfaceTransaction
- Throws:
SystemException
-
getStatus
- Specified by:
getStatus
in interfaceTransaction
- Throws:
SystemException
-
enlistResource
- Specified by:
enlistResource
in interfaceTransaction
- Throws:
RollbackException
SystemException
-
delistResource
- Specified by:
delistResource
in interfaceTransaction
- Throws:
SystemException
-
registerSynchronization
- Specified by:
registerSynchronization
in interfaceTransaction
- Throws:
RollbackException
SystemException
-