public class JtaTransactionObject extends java.lang.Object implements SmartTransactionObject
UserTransaction
.
Used as transaction object by Spring's JtaTransactionManager
.
Note: This is an SPI class, not intended to be used by applications.
JtaTransactionManager
,
UserTransaction
Constructor and Description |
---|
JtaTransactionObject(UserTransaction userTransaction)
Create a new JtaTransactionObject for the given JTA UserTransaction.
|
Modifier and Type | Method and Description |
---|---|
void |
flush()
This implementation triggers flush callbacks,
assuming that they will flush all affected ORM sessions.
|
UserTransaction |
getUserTransaction()
Return the JTA UserTransaction object for the current transaction.
|
boolean |
isRollbackOnly()
This implementation checks the UserTransaction's rollback-only flag.
|
public JtaTransactionObject(UserTransaction userTransaction)
userTransaction
- the JTA UserTransaction for the current transaction
(either a shared object or retrieved through a fresh per-transaction lookup)public final UserTransaction getUserTransaction()
public boolean isRollbackOnly()
isRollbackOnly
in interface SmartTransactionObject
UserTransaction.getStatus()
,
Status.STATUS_MARKED_ROLLBACK
public void flush()
flush
in interface java.io.Flushable
flush
in interface SmartTransactionObject
TransactionSynchronization.flush()