code: @Override
      public synchronized void executePS(final String name) throws DatabaseEngineException, ConnectionResetException {
          final PreparedStatementCapsule ps = stmts.get(name);
          if (ps == null) {
              throw new DatabaseEngineRuntimeException(String.format("PreparedStatement named '%s' does not exist", name));
          }
  
          try {
              ps.ps.execute();
  
          } catch (final SQLException e) {
              logger.error("Error executing prepared statement", e);
              if (checkConnection(conn) || !properties.isReconnectOnLost()) {
                  throw new DatabaseEngineException(String.format("Something went wrong executing the prepared statement '%s'", name), e);
              }
  
              // At this point maybe it is an error with the connection, so we try to re-establish it.
              try {
                  getConnection();
              } catch (final Exception e2) {
                  throw new DatabaseEngineException("Connection is down", e2);
              }
  
              throw new ConnectionResetException("Connection was lost, you must reset the prepared statement parameters and re-execute the statement");
          }
      }
docs: Executes the specified prepared statement.
  
  @param name The prepared statement name.
  @throws DatabaseEngineException  If something goes wrong while executing.
  @throws ConnectionResetException If the connection is down and reestablishment occurs. If this happens, the user must reset the parameters and re-execute
  the query.