com.googlecode.jdbw
Interface DatabaseTransaction

All Superinterfaces:
SQLExecutor

public interface DatabaseTransaction
extends SQLExecutor

Representing a ongoing database transaction. Remember that it is important that you either commit() or rollback() the transaction when you are done with it. Remember this applies even when handling exceptions, you must declare yourself done with the transaction so that the connection can be returned to there original data source. Failure to do so may starve the connection pool.

Author:
Martin Berglund

Method Summary
 void commit()
          This will commit the transaction on the remote server and the connection will be returned to the pool.
 void rollback()
          This will rollback the transaction on the remote server and the connection will be returned to the pool.
 
Methods inherited from interface com.googlecode.jdbw.SQLExecutor
batchWrite, batchWrite, execute
 

Method Detail

commit

void commit()
            throws SQLException
This will commit the transaction on the remote server and the connection will be returned to the pool. There object cannot be used after calling this method.

Throws:
SQLException

rollback

void rollback()
              throws SQLException
This will rollback the transaction on the remote server and the connection will be returned to the pool. There object cannot be used after calling this method.

Throws:
SQLException


Copyright © 2012. All Rights Reserved.