public void rollback(){
  checkCommitRollback();
  currentTransactionName=null;
  boolean needCommit=false;
  if (undoLog.size() > 0) {
    rollbackTo(null,false);
    needCommit=true;
  }
  if (transaction != null) {
    rollbackTo(null,false);
    needCommit=true;
    transaction.commit();
    transaction=null;
  }
  if (locks.size() > 0 || needCommit) {
    database.commit(this);
  }
  cleanTempTables(false);
  if (autoCommitAtTransactionEnd) {
    autoCommit=true;
    autoCommitAtTransactionEnd=false;
  }
  endTransaction();
}

public void rollback ( ) { checkCommitRollback ( ) ; currentTransactionName = null ; boolean needCommit = false ; if ( undoLog . size ( ) > 0 ) { rollbackTo ( null , false ) ; needCommit = true ; } if ( transaction != null ) { rollbackTo ( null , false ) ; needCommit = true ; transaction . commit ( ) ; transaction = null ; } if ( locks . size ( ) > 0 || needCommit ) { database . commit ( this ) ; } cleanTempTables ( false ) ; if ( autoCommitAtTransactionEnd ) { autoCommit = true ; autoCommitAtTransactionEnd = false ; } endTransaction ( ) ; }
fully roll back the current transaction .
