org.opensubsystems.core.persist.db
Interface DatabaseTransactionFactory

All Superinterfaces:
TransactionFactory
All Known Implementing Classes:
DatabaseTransactionFactoryImpl, J2EETransactionFactoryImpl, JOTMTransactionFactoryImpl, SimpleLocalTransactionFactoryImpl

public interface DatabaseTransactionFactory
extends TransactionFactory

Interface to extending the standard transaction factory with database related transaction activities.

Version:
$Id: DatabaseTransactionFactory.java,v 1.3 2007/01/07 06:14:18 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Method Summary
 void commitTransaction(java.sql.Connection cntConnection)
          Commit implicit transaction for given connection.
 void rollbackTransaction(java.sql.Connection cntConnection)
          Rollback implicit transaction for given connection.
 
Methods inherited from interface org.opensubsystems.core.util.TransactionFactory
getTransactionManager, requestTransaction, reset, stop
 

Method Detail

commitTransaction

void commitTransaction(java.sql.Connection cntConnection)
                       throws java.sql.SQLException
Commit implicit transaction for given connection. This operation succeed only if explicit UserTransaction is not in progress. Otherwise it has no effect. The purpose is that a given component doesn't know if a larger transaction is in progress or not. Therefore it asks the database transaction factory to commit the transaction based on connection and the transaction factory since it is aware of the larger transaction may decide to commit the transaction based on connection if no larger transaction is in progress or commit it.

Parameters:
cntConnection - - the connection to commit transaction for.
Throws:
java.sql.SQLException - - problem commiting transaction

rollbackTransaction

void rollbackTransaction(java.sql.Connection cntConnection)
                         throws java.sql.SQLException
Rollback implicit transaction for given connection. This operation succeed only if explicit UserTransaction is not in progress. Otherwise it has no effect. The purpose is that a given component doesn't know if a larger transaction is in progress or not. Therefore it asks the database transaction factory to rollback the transaction based on connection and the transaction factory since it is aware of the larger transaction may decide to rollback the transaction based on connection if no larger transaction is in progress or rollback it.

Parameters:
cntConnection - - the connection to rollback transaction for.
Throws:
java.sql.SQLException - - problem rolling back transaction


Copyright © 2003 - 2006 OpenSubsystems s.r.o.