com.metamatrix.common.connection
Interface TransactionInterface

All Known Subinterfaces:
AuthorizationSourceTransaction, DBIDSourceTransaction, ExtensionModuleTransaction, MetaBaseConnector
All Known Implementing Classes:
BaseTransaction, DBIDResourceTransaction, JDBCAuthorizationTransaction, JDBCConnector, JDBCExtensionModuleTransaction

public interface TransactionInterface

This new interface should actually be in com.metamatrix.common.connection.


Method Summary
 void close()
          Return whether this transaction is readonly.
 void commit()
          Make all changes made during this transaction's lifetime and release any data source locks currently held by the associated Connection.
 boolean isClosed()
          Return whether this transaction is readonly.
 boolean isReadonly()
          Return whether this transaction is readonly.
 void rollback()
          Drops all changes made during this transaction's lifetime and release any data source locks currently held by the associated Connection.
 

Method Detail

commit

void commit()
            throws ManagedConnectionException
Make all changes made during this transaction's lifetime and release any data source locks currently held by the associated Connection. A transaction can be committed or rolled back any number of times throughout its lifetime, and throughout its lifetime the transaction is guaranteed to have the same connection.

Throws:
ManagedConnectionException - if an error occurred within or during communication with the associated connection.

rollback

void rollback()
              throws ManagedConnectionException
Drops all changes made during this transaction's lifetime and release any data source locks currently held by the associated Connection. Once this method is executed, the transaction (after rolling back) becomes invalid, and the connection referenced by this transaction is returned to the pool.

Calling this method on a read-only transaction is unneccessary (and discouraged, since the implementation does nothing in that case anyway).

Throws:
ManagedConnectionException - if an error occurred within or during communication with the associated connection.

isReadonly

boolean isReadonly()
Return whether this transaction is readonly.

Returns:
true if this transaction is readonly, or false otherwise.

isClosed

boolean isClosed()
Return whether this transaction is readonly.

Returns:
true if this transaction is readonly, or false otherwise.

close

void close()
Return whether this transaction is readonly.



Copyright © 2009. All Rights Reserved.