/**
   * Change the EPP client password from oldPassword to newPassword. Note that this does not update
   * the configuration source to reflect the change - that must be done separately before any future
   * attempts to (re-)configure the system.
   */
  @Override
  public void changePassword(String oldPassword, String newPassword) {
    debugLogger.finest("enter");

    userLogger.info(
        ErrorPkg.getMessage(
            "reconfigure.pw.change.init",
            new String[] {"<<old>>", "<<new>>"},
            new String[] {oldPassword, newPassword}));

    sessionPool.empty();

    try {
      Session session = SessionFactory.newInstance(properties.getSessionProperties());
      session.changePassword(newPassword);
      // Attempts to get a session between changePassword and setClientPW
      // will fail if the password was successfully changed. It is the
      // application's responsibility to handle transaction failures
      // during a change of password. This is expected to occur very
      // infrequently.
      properties.getSessionProperties().setClientPW(newPassword);
    } catch (Exception ex) {
      userLogger.severe(ex.getMessage());
      userLogger.severe(ErrorPkg.getMessage("reconfigure.pw.change.fail"));
    }

    debugLogger.finest("exit");
  }
  private void doConfigure() throws Exception {
    debugLogger = Logger.getLogger(pname + ".debug");
    userLogger = Logger.getLogger(pname + ".user");
    debugLogger.info(
        "Logging configured from file: " + System.getProperty("java.util.logging.config.file"));

    EPPSchemaProvider.init();
    EPPSchemaProvider.setValidating(properties.getSessionProperties().enforceStrictValidation());
    // Need to empty and re-initialise pool if already in use.
    if (sessionPool != null) {
      sessionPool.empty();
    }

    sessionPool =
        new SessionPoolImpl(
            properties.getSessionPoolProperties(), properties.getSessionProperties());
  }