org.skife.jdbi.tweak
Interface TransactionHandler

All Known Implementing Classes:
BMTTransactionHandler, CMTConnectionTransactionHandler, ConnectionTransactionHandler

public interface TransactionHandler

Interface which defines callbacks to be used when transaction methods are called on a handle. Used by specifying on an IDBI instance. All Handle instances opened from that IDBI will use the handler specified.

The default implementation, ConnectionTransactionHandler, explicitely manages the transactions on the underlying JDBC Connection.

See Also:
ConnectionTransactionHandler, CMTConnectionTransactionHandler

Method Summary
 void begin(Handle handle)
          Called when a transaction is started
 void commit(Handle handle)
          Called when a transaction is committed
 boolean isInTransaction(Handle handle)
          Called to test if a handle is in a transaction
 void rollback(Handle handle)
          Called when a transaction is rolled back
 

Method Detail

begin

void begin(Handle handle)
Called when a transaction is started


commit

void commit(Handle handle)
Called when a transaction is committed


rollback

void rollback(Handle handle)
Called when a transaction is rolled back


isInTransaction

boolean isInTransaction(Handle handle)
Called to test if a handle is in a transaction