pt.ist.fenixframework
Interface CommitListener

Package class diagram package CommitListener

public interface CommitListener

Represents a listener that will be notified whenever a Transaction is committed. This interface is meant to be implemented by users of the Framework. Note that the implementation of this interface MUST be thread-safe, since there may be several Transactions being committed at once, causing the methods in the listener to be called concurrently.


Method Summary
 void afterCommit(Transaction transaction)
          This method is called after any Transaction is committed.
 void beforeCommit(Transaction transaction)
          This method is called before any Transaction is committed.
 

Method Detail

beforeCommit

void beforeCommit(Transaction transaction)
This method is called before any Transaction is committed. Any unchecked exception throw by this method is going to cause the transaction to be rolled back instead of committed.

Parameters:
transaction - The transaction about to be committed.

afterCommit

void afterCommit(Transaction transaction)
This method is called after any Transaction is committed. The outcome of the transaction can be determined by calling Transaction.getStatus()

Parameters:
transaction - The transaction that was committed/rolled-back.


Copyright © 2013. All Rights Reserved.