public static boolean rollback(boolean throwException,String trxName) throws SQLException {
  try {
    Connection conn=null;
    Trx trx=trxName == null ? null : Trx.get(trxName,true);
    if (trx != null)     return trx.rollback(true);
 else     conn=DB.getConnectionRW();
    if (conn != null && !conn.getAutoCommit())     conn.rollback();
  }
 catch (  SQLException e) {
    log.log(Level.SEVERE,"[" + trxName + "]",e);
    if (throwException)     throw e;
    return false;
  }
  return true;
}

public static boolean rollback ( boolean throwException , String trxName ) throws SQLException { try { Connection conn = null ; Trx trx = trxName == null ? null : Trx . get ( trxName , true ) ; if ( trx != null ) return trx . rollback ( true ) ; else conn = DB . getConnectionRW ( ) ; if ( conn != null && ! conn . getAutoCommit ( ) ) conn . rollback ( ) ; } catch ( SQLException e ) { log . log ( Level . SEVERE , "[" + trxName + "]" , e ) ; if ( throwException ) throw e ; return false ; } return true ; }
rollback - rollback on rw connection . is has no effect as rw connection is autocommit ( exception : with transaction )
