org.springframework.transaction.support
Interface SmartTransactionObject

All Known Implementing Classes:
DataSourceTransactionManager.DataSourceTransactionObject, HibernateTransactionManager.HibernateTransactionObject, JdbcTransactionObjectSupport, JdoTransactionManager.JdoTransactionObject, JmsTransactionManager.JmsTransactionObject, JpaTransactionManager.JpaTransactionObject, JtaTransactionObject

public interface SmartTransactionObject

Interface to be implemented by transaction objects that are able to return an internal rollback-only marker, typically from a another transaction that has participated and marked it as rollback-only.

Autodetected by DefaultTransactionStatus, to always return a current rollbackOnly flag even if not resulting from the current TransactionStatus.

Since:
1.1
Author:
Juergen Hoeller
See Also:
AbstractTransactionStatus.isRollbackOnly()

Method Summary
 void flush()
          Flush the underlying sessions to the datastore, if applicable: for example, all affected Hibernate/JPA sessions.
 boolean isRollbackOnly()
          Return whether the transaction is internally marked as rollback-only.
 

Method Detail

isRollbackOnly

boolean isRollbackOnly()
Return whether the transaction is internally marked as rollback-only. Can, for example, check the JTA UserTransaction.

See Also:
javax.transaction.UserTransaction#getStatus, javax.transaction.Status#STATUS_MARKED_ROLLBACK

flush

void flush()
Flush the underlying sessions to the datastore, if applicable: for example, all affected Hibernate/JPA sessions.