org.apache.cayenne.access
Interface TransactionDelegate


public interface TransactionDelegate

Defines callback methods for tracking and customizing Transactions execution.

Since:
1.1

Method Summary
 void didCommit(Transaction transaction)
          Called after a Transaction commit.
 void didRollback(Transaction transaction)
          Called after a Transaction is rolledback.
 boolean willAddConnection(Transaction transaction, Connection connection)
          Called within a context of a Transaction when a new JDBC onnection is added to the the transaction.
 boolean willCommit(Transaction transaction)
          Called within a context of a Transaction before the transaction is committed.
 boolean willMarkAsRollbackOnly(Transaction transaction)
          Called within a context of a Transaction before transaction is marked as "rollback only", meaning that further commit is not possible.
 boolean willRollback(Transaction transaction)
          Called within a context of a Transaction before the transaction is rolledback.
 

Method Detail

willCommit

boolean willCommit(Transaction transaction)
Called within a context of a Transaction before the transaction is committed. Delegate can do its own processing, and optionally suppress further commit processing by Cayenne by returning false.


willMarkAsRollbackOnly

boolean willMarkAsRollbackOnly(Transaction transaction)
Called within a context of a Transaction before transaction is marked as "rollback only", meaning that further commit is not possible. Delegate can do its own processing, and optionally suppress setting transaction status by returning false.


willRollback

boolean willRollback(Transaction transaction)
Called within a context of a Transaction before the transaction is rolledback. Delegate can do its own processing, and optionally suppress further rollback processing by Cayenne by returning false.


didCommit

void didCommit(Transaction transaction)
Called after a Transaction commit.


didRollback

void didRollback(Transaction transaction)
Called after a Transaction is rolledback.


willAddConnection

boolean willAddConnection(Transaction transaction,
                          Connection connection)
Called within a context of a Transaction when a new JDBC onnection is added to the the transaction. Delegate can do its own processing, and optionally suppress connection registration with the transaction by returning false.



Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.