code: public void reconnect() throws SQLException {
      boolean inTransaction = currentProtocol != null && currentProtocol.inTransaction();
      reconnectFailedConnection(new SearchFilter(true, false));
      handleFailLoop();
      if (inTransaction) {
        throw new ReconnectDuringTransactionException(
            "Connection reconnect automatically during an active transaction", 1401, "25S03");
      }
    }
docs: Try to reconnect connection.
  
  @throws SQLException if reconnect a new connection but there was an active transaction.