com.subshell.persistence.runner
Interface TransactionContextRunner

All Known Implementing Classes:
SelfContainedTransactionContextRunner, SimpleTransactionContextRunner

public interface TransactionContextRunner

Runs a Runnable and provides it with a transaction context. Implementors will take care of setting up/destroying the transaction context. Additionally, they will commit/roll back the Transaction as necessary.

Note: The transaction must not be committed/rolled back by the Runnable.

Implementors must be thread-safe.


Method Summary
 void run(Runnable runnable)
          Runs the specified Runnable and provides it with a transaction context.
 

Method Detail

run

void run(Runnable runnable)
         throws ErrorInRunnableException,
                PersistenceException

Runs the specified Runnable and provides it with a transaction context. Implementors take care of setting up/destroying the transaction context. They will also commit/roll back the transaction as necessary.

Note: The transaction must not be committed/rolled back by the Runnable.

Throws:
ErrorInRunnableException - when the Runnable itself has thrown an exception
PersistenceException - when there is a persistence-related error


Copyright © 2004-2005 subshell GmbH. All Rights Reserved.