|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.connection.BaseTransaction
public abstract class BaseTransaction
| Constructor Summary | |
|---|---|
protected |
BaseTransaction(ManagedConnection connection,
boolean readonly)
|
| 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. |
protected void |
finalize()
|
ManagedConnection |
getConnection()
Return the connection associated with this transaction. |
static boolean |
getRollbackOnFinalize()
Return whether transactions, if they have not been committed or rolled back when they are destroyed, are rolled back or committed. |
boolean |
isClosed()
Return whether this transaction is readonly. |
boolean |
isEnded()
Return whether this transaction is ended. |
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. |
static void |
setRollbackOnFinalize(boolean rollback)
Set whether transactions, if they have not been committed or rolled back when they are destroyed, are rolled back or committed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BaseTransaction(ManagedConnection connection,
boolean readonly)
throws ManagedConnectionException
ManagedConnectionException| Method Detail |
|---|
protected void finalize()
finalize in class java.lang.Object
public void commit()
throws ManagedConnectionException
commit in interface TransactionInterfaceManagedConnectionException - if an error occurred within or during communication with the associated connection.
public void rollback()
throws ManagedConnectionException
Calling this method on a read-only transaction is unneccessary (and discouraged, since the implementation does nothing in that case anyway).
rollback in interface TransactionInterfaceManagedConnectionException - if an error occurred within or during communication with the associated connection.
public ManagedConnection getConnection()
throws ManagedConnectionException
ManagedConnectionExceptionpublic final boolean isReadonly()
isReadonly in interface TransactionInterfacepublic final boolean isEnded()
public final boolean isClosed()
isClosed in interface TransactionInterfacepublic void close()
close in interface TransactionInterfacepublic static final boolean getRollbackOnFinalize()
public static final void setRollbackOnFinalize(boolean rollback)
rollback - true if transactions should be rolled back when destroyed if not previously
committed or rolled back.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||