public static void rollback(boolean beganTransaction,String causeMessage,Throwable causeThrowable) throws GenericTransactionException {
  if (beganTransaction) {
    TransactionUtil.rollback(causeThrowable);
  }
 else {
    TransactionUtil.setRollbackOnly(causeMessage,causeThrowable);
  }
}

public static void rollback ( boolean beganTransaction , String causeMessage , Throwable causeThrowable ) throws GenericTransactionException { if ( beganTransaction ) { TransactionUtil . rollback ( causeThrowable ) ; } else { TransactionUtil . setRollbackOnly ( causeMessage , causeThrowable ) ; } }
rolls back transaction in the current thread if transactions are available and if begantransaction is true ; if begantransaction is not true , setrollbackonly is called to insure that the transaction will be rolled back
