org.springframework.transaction.jta
Class ManagedTransactionAdapter
java.lang.Object
org.springframework.transaction.jta.ManagedTransactionAdapter
public class ManagedTransactionAdapter
- extends java.lang.Object
Adapter for a managed JTA Transaction handle, taking a JTA
javax.transaction.TransactionManager
reference and creating
a JTA javax.transaction.Transaction
handle for it.
- Since:
- 3.0.2
- Author:
- Juergen Hoeller
Constructor Summary |
ManagedTransactionAdapter(TransactionManager transactionManager)
Create a new ManagedTransactionAdapter for the given TransactionManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transactionManager
private final TransactionManager transactionManager
ManagedTransactionAdapter
public ManagedTransactionAdapter(TransactionManager transactionManager)
throws SystemException
- Create a new ManagedTransactionAdapter for the given TransactionManager.
- Parameters:
transactionManager
- the JTA TransactionManager to wrap
- Throws:
SystemException
getTransactionManager
public final TransactionManager getTransactionManager()
- Return the JTA TransactionManager that this adapter delegates to.
commit
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
java.lang.SecurityException,
SystemException
- Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
java.lang.SecurityException
SystemException
rollback
public void rollback()
throws SystemException
- Throws:
SystemException
setRollbackOnly
public void setRollbackOnly()
throws SystemException
- Throws:
SystemException
getStatus
public int getStatus()
throws SystemException
- Throws:
SystemException
enlistResource
public boolean enlistResource(javax.transaction.xa.XAResource xaRes)
throws RollbackException,
SystemException
- Throws:
RollbackException
SystemException
delistResource
public boolean delistResource(javax.transaction.xa.XAResource xaRes,
int flag)
throws SystemException
- Throws:
SystemException
registerSynchronization
public void registerSynchronization(Synchronization sync)
throws RollbackException,
SystemException
- Throws:
RollbackException
SystemException