safejdbc
Interface TXCodeBlock
- public interface TXCodeBlock
All code in a TXCodeBlock is performed within a single transaction. An
implementation of this interface is passed to the
executeTX method of SQLExecuter. This method initializes the transaction,
then calls the doTransaction method of the TXCodeBlock. Finally, it commits
the transaction or - if an exception occurred - it rolls the transaction back.
Method Summary |
void |
doTransaction(SQL sql)
This method is called by the executeTX method of SQLExecuter. |
doTransaction
public void doTransaction(SQL sql)
throws java.sql.SQLException
- This method is called by the executeTX method of SQLExecuter. It
contains all operations that are executed in a separate transaction;
the transaction starts immediately before this method is calls, and
it is ended immediately after this method returns.
- Parameters:
sql
- is a special implementation of the SQL interface. The methods
of this implementation provide the actual database operations to be
performed in the transaction.
Copyright (c) 2001, 2002 by Jan Hermanns and Arno Haase. All Rights Reserved.