spring-framework / org.springframework.transaction.jta / UserTransactionAdapter

UserTransactionAdapter

open class UserTransactionAdapter : UserTransaction

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.

Author
Juergen Hoeller

Since
1.1.5

Constructors

<init>

UserTransactionAdapter(transactionManager: TransactionManager)

Create a new UserTransactionAdapter for the given TransactionManager.

Functions

begin

open fun begin(): Unit

commit

open fun commit(): Unit

getStatus

open fun getStatus(): Int

getTransactionManager

fun getTransactionManager(): TransactionManager

Return the JTA TransactionManager that this adapter delegates to.

rollback

open fun rollback(): Unit

setRollbackOnly

open fun setRollbackOnly(): Unit

setTransactionTimeout

open fun setTransactionTimeout(timeout: Int): Unit