Class UserTransactionAdapter
java.lang.Object
org.springframework.transaction.jta.UserTransactionAdapter
- All Implemented Interfaces:
- UserTransaction
Adapter for a JTA UserTransaction handle, taking a JTA
 
TransactionManager reference and creating
 a JTA 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.
- Since:
- 1.1.5
- Author:
- Juergen Hoeller
- 
Constructor SummaryConstructorsConstructorDescriptionUserTransactionAdapter(TransactionManager transactionManager) Create a new UserTransactionAdapter for the given TransactionManager.
- 
Method SummaryModifier and TypeMethodDescriptionvoidbegin()voidcommit()intfinal TransactionManagerReturn the JTA TransactionManager that this adapter delegates to.voidrollback()voidvoidsetTransactionTimeout(int timeout) 
- 
Constructor Details- 
UserTransactionAdapterCreate a new UserTransactionAdapter for the given TransactionManager.- Parameters:
- transactionManager- the JTA TransactionManager to wrap
 
 
- 
- 
Method Details- 
getTransactionManagerReturn the JTA TransactionManager that this adapter delegates to.
- 
setTransactionTimeout- Specified by:
- setTransactionTimeoutin interface- UserTransaction
- Throws:
- SystemException
 
- 
begin- Specified by:
- beginin interface- UserTransaction
- Throws:
- NotSupportedException
- SystemException
 
- 
commitpublic void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException- Specified by:
- commitin interface- UserTransaction
- Throws:
- RollbackException
- HeuristicMixedException
- HeuristicRollbackException
- SecurityException
- SystemException
 
- 
rollback- Specified by:
- rollbackin interface- UserTransaction
- Throws:
- SecurityException
- SystemException
 
- 
setRollbackOnly- Specified by:
- setRollbackOnlyin interface- UserTransaction
- Throws:
- SystemException
 
- 
getStatus- Specified by:
- getStatusin interface- UserTransaction
- Throws:
- SystemException
 
 
-