@Override public void rollback(Xid xid) throws XAException {
  if (isDebugEnabled()) {
    debugCode("rollback(" + JdbcXid.toString(xid) + ");");
  }
  try {
    if (prepared) {
      try (Statement stat=physicalConn.createStatement()){
        stat.execute("ROLLBACK TRANSACTION " + JdbcXid.toString(xid));
      }
       prepared=false;
    }
 else {
      physicalConn.rollback();
    }
    physicalConn.setAutoCommit(true);
  }
 catch (  SQLException e) {
    throw convertException(e);
  }
  currentTransaction=null;
}

@ Override public void rollback ( Xid xid ) throws XAException { if ( isDebugEnabled ( ) ) { debugCode ( "rollback(" + JdbcXid . toString ( xid ) + ");" ) ; } try { if ( prepared ) { try ( Statement stat = physicalConn . createStatement ( ) ) { stat . execute ( "ROLLBACK TRANSACTION " + JdbcXid . toString ( xid ) ) ; } prepared = false ; } else { physicalConn . rollback ( ) ; } physicalConn . setAutoCommit ( true ) ; } catch ( SQLException e ) { throw convertException ( e ) ; } currentTransaction = null ; }
roll back a transaction .
