mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

lutoff
18.14.2008 d42b15e420478dc45785fff6e00b863cc1f8a0f9
opends/src/server/org/opends/server/extensions/ConfigFileHandler.java
@@ -174,9 +174,12 @@
  // The path to the configuration file.
  private String configFile;
  // The instance root directory for the Directory Server.
  // The install root directory for the Directory Server.
  private String serverRoot;
  // The instance root directory for the Directory Server.
  private String instanceRoot;
  /**
@@ -694,7 +697,7 @@
        if (serverRoot == null)
        {
          Message message = ERR_CONFIG_CANNOT_DETERMINE_SERVER_ROOT.get(
              ENV_VAR_INSTANCE_ROOT);
              ENV_VAR_INSTALL_ROOT);
          throw new InitializationException(message);
        }
      }
@@ -715,7 +718,7 @@
        }
        Message message =
            ERR_CONFIG_CANNOT_DETERMINE_SERVER_ROOT.get(ENV_VAR_INSTANCE_ROOT);
            ERR_CONFIG_CANNOT_DETERMINE_SERVER_ROOT.get(ENV_VAR_INSTALL_ROOT);
        throw new InitializationException(message);
      }
    }
@@ -724,6 +727,23 @@
      serverRoot = rootFile.getAbsolutePath();
    }
    // Determine the appropriate server root.  If it's not defined in the
    // environment config, then try to figure it out from the location of the
    // configuration file.
    File instanceFile = envConfig.getInstanceRootFromServerRoot(new File(
        serverRoot));
    if (instanceFile == null)
    {
      Message message =
        ERR_CONFIG_CANNOT_DETERMINE_SERVER_ROOT.get(ENV_VAR_INSTALL_ROOT);
        throw new InitializationException(message);
    }
    else
    {
      instanceRoot = instanceFile.getAbsolutePath();
    }
    // Register with the Directory Server as an alert generator.
    DirectoryServer.registerAlertGenerator(this);
@@ -1083,6 +1103,15 @@
    return serverRoot;
  }
  /**
   * {@inheritDoc}
   */
  @Override()
  public String getInstanceRoot()
  {
    return instanceRoot;
  }
  /**