org.springframework.transaction.jta
Class ManagedTransactionAdapter

java.lang.Object
  extended by 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

Field Summary
private  TransactionManager transactionManager
           
 
Constructor Summary
ManagedTransactionAdapter(TransactionManager transactionManager)
          Create a new ManagedTransactionAdapter for the given TransactionManager.
 
Method Summary
 void commit()
           
 boolean delistResource(javax.transaction.xa.XAResource xaRes, int flag)
           
 boolean enlistResource(javax.transaction.xa.XAResource xaRes)
           
 int getStatus()
           
 TransactionManager getTransactionManager()
          Return the JTA TransactionManager that this adapter delegates to.
 void registerSynchronization(Synchronization sync)
           
 void rollback()
           
 void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionManager

private final TransactionManager transactionManager
Constructor Detail

ManagedTransactionAdapter

public ManagedTransactionAdapter(TransactionManager transactionManager)
                          throws SystemException
Create a new ManagedTransactionAdapter for the given TransactionManager.

Parameters:
transactionManager - the JTA TransactionManager to wrap
Throws:
SystemException
Method Detail

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