Class JtaTransactionObject
java.lang.Object
org.springframework.transaction.jta.JtaTransactionObject
- All Implemented Interfaces:
Flushable
,SmartTransactionObject
JTA transaction object, representing a
UserTransaction
.
Used as transaction object by Spring's JtaTransactionManager
.
Note: This is an SPI class, not intended to be used by applications.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionJtaTransactionObject
(UserTransaction userTransaction) Create a new JtaTransactionObject for the given JTA UserTransaction. -
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
This implementation triggers flush callbacks, assuming that they will flush all affected ORM sessions.final UserTransaction
Return the JTA UserTransaction object for the current transaction.boolean
This implementation checks the UserTransaction's rollback-only flag.
-
Constructor Details
-
JtaTransactionObject
Create a new JtaTransactionObject for the given JTA UserTransaction.- Parameters:
userTransaction
- the JTA UserTransaction for the current transaction (either a shared object or retrieved through a fresh per-transaction lookup)
-
-
Method Details
-
getUserTransaction
Return the JTA UserTransaction object for the current transaction. -
isRollbackOnly
public boolean isRollbackOnly()This implementation checks the UserTransaction's rollback-only flag.- Specified by:
isRollbackOnly
in interfaceSmartTransactionObject
- See Also:
-
flush
public void flush()This implementation triggers flush callbacks, assuming that they will flush all affected ORM sessions.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceSmartTransactionObject
- See Also:
-