org.skife.jdbi.tweak
Class BMTTransactionHandler

java.lang.Object
  extended by org.skife.jdbi.tweak.BMTTransactionHandler
All Implemented Interfaces:
TransactionHandler

public class BMTTransactionHandler
extends java.lang.Object
implements TransactionHandler

Transaction Handler which uses a JNDI lookup for an explicitely managed JTA UserTransaction for all transactional activity.


Constructor Summary
BMTTransactionHandler(java.lang.String jndiUserTransaction)
          Must be passed JNDI lookup key for the UserTransaction in use
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BMTTransactionHandler

public BMTTransactionHandler(java.lang.String jndiUserTransaction)
Must be passed JNDI lookup key for the UserTransaction in use

Method Detail

begin

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

Specified by:
begin in interface TransactionHandler

commit

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

Specified by:
commit in interface TransactionHandler

rollback

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

Specified by:
rollback in interface TransactionHandler

isInTransaction

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

Specified by:
isInTransaction in interface TransactionHandler