org.springframework.transaction.jta
Class JtaTransactionObject

java.lang.Object
  extended by org.springframework.transaction.jta.JtaTransactionObject
All Implemented Interfaces:
SmartTransactionObject

public class JtaTransactionObject
extends java.lang.Object
implements SmartTransactionObject

JTA transaction object, representing a javax.transaction.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:
JtaTransactionManager, javax.transaction.UserTransaction

Field Summary
private  UserTransaction userTransaction
           
 
Constructor Summary
JtaTransactionObject(UserTransaction userTransaction)
          Create a new JtaTransactionObject for the given JTA UserTransaction.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userTransaction

private final UserTransaction userTransaction
Constructor Detail

JtaTransactionObject

public JtaTransactionObject(UserTransaction userTransaction)
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 lookuip)
Method Detail

getUserTransaction

public final UserTransaction 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 interface SmartTransactionObject
See Also:
javax.transaction.UserTransaction#getStatus, javax.transaction.Status#STATUS_MARKED_ROLLBACK

flush

public void flush()
This implementation triggers flush callbacks, assuming that they will flush all affected ORM sessions.

Specified by:
flush in interface SmartTransactionObject
See Also:
TransactionSynchronization.flush()