Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.transaction.jta
Class ManagedTransactionAdapter

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

All Implemented Interfaces:
  javax.transaction.Transaction

    public class ManagedTransactionAdapter

extends java.lang.Object
implements javax.transaction.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(javax.transaction.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()`
`javax.transaction.TransactionManager` | `getTransactionManager()` Return the JTA TransactionManager that this adapter delegates to.
`void` | `registerSynchronization(javax.transaction.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(javax.transaction.TransactionManager transactionManager)
                              throws javax.transaction.SystemException

  Create a new ManagedTransactionAdapter for the given TransactionManager.

  Parameters:
    `transactionManager` - the JTA TransactionManager to wrap
  Throws:
    `javax.transaction.SystemException`

Method Detail

### getTransactionManager

    public final javax.transaction.TransactionManager getTransactionManager()

  Return the JTA TransactionManager that this adapter delegates to.

### commit

    public void commit()
                throws javax.transaction.RollbackException,
                       javax.transaction.HeuristicMixedException,
                       javax.transaction.HeuristicRollbackException,
                       java.lang.SecurityException,
                       javax.transaction.SystemException

  Specified by:
    `commit` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.RollbackException`
    `javax.transaction.HeuristicMixedException`
    `javax.transaction.HeuristicRollbackException`
    `java.lang.SecurityException`
    `javax.transaction.SystemException`

### rollback

    public void rollback()
                  throws javax.transaction.SystemException

  Specified by:
    `rollback` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.SystemException`

### setRollbackOnly

    public void setRollbackOnly()
                         throws javax.transaction.SystemException

  Specified by:
    `setRollbackOnly` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.SystemException`

### getStatus

    public int getStatus()
                  throws javax.transaction.SystemException

  Specified by:
    `getStatus` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.SystemException`

### enlistResource

    public boolean enlistResource(javax.transaction.xa.XAResource xaRes)
                           throws javax.transaction.RollbackException,
                                  javax.transaction.SystemException

  Specified by:
    `enlistResource` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.RollbackException`
    `javax.transaction.SystemException`

### delistResource

    public boolean delistResource(javax.transaction.xa.XAResource xaRes,
                                  int flag)
                           throws javax.transaction.SystemException

  Specified by:
    `delistResource` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.SystemException`

### registerSynchronization

    public void registerSynchronization(javax.transaction.Synchronization sync)
                                 throws javax.transaction.RollbackException,
                                        javax.transaction.SystemException

  Specified by:
    `registerSynchronization` in interface `javax.transaction.Transaction`
  Throws:
    `javax.transaction.RollbackException`
    `javax.transaction.SystemException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD