4.3.1.22 Interface Transaction

4.3.1.22.1 Synopsis
4.3.1.22.2 begin()
4.3.1.22.3 commit()
4.3.1.22.4 getRollbackOnly()
4.3.1.22.5 isActive()
4.3.1.22.6 rollback()
4.3.1.22.7 setRollbackOnly()

Transaction represents a user transaction active in the cluster.

4.3.1.22.1 Synopsis
 public interface Transaction {
// Public Methods  public void begin();
  public void commit();
  public boolean getRollbackOnly();
  public boolean isActive();
  public void rollback();
  public void setRollbackOnly();
}
4.3.1.22.2 begin()
public void begin();

Begin a transaction.

4.3.1.22.3 commit()
public void commit();

Commit a transaction.

4.3.1.22.4 getRollbackOnly()
public boolean getRollbackOnly();

Has this transaction been marked for rollback only?

Parameters

return

true if the transaction has been marked for rollback only

4.3.1.22.5 isActive()
public boolean isActive();

Is there a transaction currently active?

Parameters

return

true if a transaction is active

4.3.1.22.6 rollback()
public void rollback();

Roll back a transaction.

4.3.1.22.7 setRollbackOnly()
public void setRollbackOnly();

Mark this transaction as rollback only. After this method is called, commit() will roll back the transaction and throw an exception; rollback() will roll back the transaction and not throw an exception.