## org.springframework.transaction.jta
Class ManagedTransactionAdapter

    java.lang.Object
      org.springframework.transaction.jta.ManagedTransactionAdapter

All Implemented Interfaces:
  Transaction

    public class ManagedTransactionAdapter

extends Object
implements 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
`ManagedTransactionAdapter(TransactionManager transactionManager)` Create a new ManagedTransactionAdapter for the given TransactionManager.

Method Summary
`void` `commit()`
`boolean` `delistResource(XAResource xaRes, int flag)`
`boolean` `enlistResource(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`

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,
                       SecurityException,
                       SystemException

  Specified by:
    `commit` in interface `Transaction`
  Throws:
    `RollbackException`
    `HeuristicMixedException`
    `HeuristicRollbackException`
    `SecurityException`
    `SystemException`

### rollback

    public void rollback()
                  throws SystemException

  Specified by:
    `rollback` in interface `Transaction`
  Throws:
    `SystemException`

### setRollbackOnly

    public void setRollbackOnly()
                         throws SystemException

  Specified by:
    `setRollbackOnly` in interface `Transaction`
  Throws:
    `SystemException`

### getStatus

    public int getStatus()
                  throws SystemException

  Specified by:
    `getStatus` in interface `Transaction`
  Throws:
    `SystemException`

### enlistResource

    public boolean enlistResource(XAResource xaRes)
                           throws RollbackException,
                                  SystemException

  Specified by:
    `enlistResource` in interface `Transaction`
  Throws:
    `RollbackException`
    `SystemException`

### delistResource

    public boolean delistResource(XAResource xaRes,
                                  int flag)
                           throws SystemException

  Specified by:
    `delistResource` in interface `Transaction`
  Throws:
    `SystemException`

### registerSynchronization

    public void registerSynchronization(Synchronization sync)
                                 throws RollbackException,
                                        SystemException

  Specified by:
    `registerSynchronization` in interface `Transaction`
  Throws:
    `RollbackException`
    `SystemException`