Top Description Fields Constructors Methods
org.springframework.transaction.jta

public Class JtaTransactionObject

extends Object
implements SmartTransactionObject
Class Inheritance
All Implemented Interfaces
org.springframework.transaction.support.SmartTransactionObject, java.io.Flushable
Imports
jakarta.transaction.Status, .SystemException, .UserTransaction, org.springframework.transaction.TransactionSystemException, org.springframework.transaction.support.SmartTransactionObject, .TransactionSynchronizationUtils

JTA transaction object, representing a jakarta.transaction.UserTransaction. Used as transaction object by Spring's JtaTransactionManager.

Note

This is an SPI class, not intended to be used by applications.

Author
Juergen Hoeller
Since
1.1
See Also
JtaTransactionManager, jakarta.transaction.UserTransaction

Field Summary

Modifier and TypeField and Description
pack-priv boolean
private final UserTransaction

Constructor Summary

AccessConstructor and Description
public
JtaTransactionObject(UserTransaction
the JTA UserTransaction for the current transaction (either a shared object or retrieved through a fresh per-transaction lookup)
userTransaction
)

Create a new JtaTransactionObject for the given JTA UserTransaction.

Method Summary

Modifier and TypeMethod and Description
public void
flush()

Overrides default org.springframework.transaction.support.SmartTransactionObject.flush.

This implementation triggers flush callbacks, assuming that they will flush all affected ORM sessions.

public final UserTransaction
getUserTransaction()

Return the JTA UserTransaction object for the current transaction.

public boolean
isRollbackOnly()

Overrides default org.springframework.transaction.support.SmartTransactionObject.isRollbackOnly.

This implementation checks the UserTransaction's rollback-only flag.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

resetTransactionTimeoutback to summary
pack-priv boolean resetTransactionTimeout
userTransactionback to summary
private final UserTransaction userTransaction

Constructor Detail

JtaTransactionObjectback to summary
public JtaTransactionObject(UserTransaction userTransaction)

Create a new JtaTransactionObject for the given JTA UserTransaction.

Parameters
userTransaction:UserTransaction

the JTA UserTransaction for the current transaction (either a shared object or retrieved through a fresh per-transaction lookup)

Method Detail

flushback to summary
public void flush()

Overrides default org.springframework.transaction.support.SmartTransactionObject.flush.

This implementation triggers flush callbacks, assuming that they will flush all affected ORM sessions.

Annotations
@Override
See Also
org.springframework.transaction.support.TransactionSynchronization#flush()
getUserTransactionback to summary
public final UserTransaction getUserTransaction()

Return the JTA UserTransaction object for the current transaction.

isRollbackOnlyback to summary
public boolean isRollbackOnly()

Overrides default org.springframework.transaction.support.SmartTransactionObject.isRollbackOnly.

This implementation checks the UserTransaction's rollback-only flag.

Annotations
@Override