public class

UserTransactionAdapter

extends Object
implements UserTransaction
java.lang.Object
   ↳ org.springframework.transaction.jta.UserTransactionAdapter

Class Overview

Adapter for a JTA UserTransaction handle, taking a JTA javax.transaction.TransactionManager reference and creating a JTA javax.transaction.UserTransaction handle for it.

The JTA UserTransaction interface is an exact subset of the JTA TransactionManager interface. Unfortunately, it does not serve as super-interface of TransactionManager, though, which requires an adapter such as this class to be used when intending to talk to a TransactionManager handle through the UserTransaction interface.

Used internally by Spring's JtaTransactionManager for certain scenarios. Not intended for direct use in application code.

Summary

Public Constructors
UserTransactionAdapter(TransactionManager transactionManager)
Create a new UserTransactionAdapter for the given TransactionManager.
Public Methods
void begin()
void commit()
int getStatus()
final TransactionManager getTransactionManager()
Return the JTA TransactionManager that this adapter delegates to.
void rollback()
void setRollbackOnly()
void setTransactionTimeout(int timeout)
[Expand]
Inherited Methods
From class java.lang.Object
From interface javax.transaction.UserTransaction

Public Constructors

public UserTransactionAdapter (TransactionManager transactionManager)

Create a new UserTransactionAdapter for the given TransactionManager.

Parameters
transactionManager the JTA TransactionManager to wrap

Public Methods

public void begin ()

Throws
NotSupportedException
SystemException

public void commit ()

Throws
HeuristicMixedException
HeuristicRollbackException
RollbackException
SecurityException
SystemException

public int getStatus ()

Throws
SystemException

public final TransactionManager getTransactionManager ()

Return the JTA TransactionManager that this adapter delegates to.

public void rollback ()

Throws
SecurityException
SystemException

public void setRollbackOnly ()

Throws
SystemException

public void setTransactionTimeout (int timeout)

Throws
SystemException