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

jvergara
12.46.2007 156826110630a6de143382854c7fa5b17d44693f
Initialize the locks properties with the installation path found using the classpath.  This is required when the user.dir variable of the JVM used to launch setup does not match the installation path.  This is what happens for example when the setup is launched using an external tool (like Abbot).

This only affects the setup and is safe (or at least does not make things worse) because the setup is figuring out the server root based on the jar files in the class path.
1 files modified
12 ■■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
@@ -68,6 +68,8 @@
  private String ldapsUrl;
  private static boolean lockPathInitialized;
  /**
   * The constructor of a CurrentInstallStatus object.
   *
@@ -222,6 +224,16 @@
  public static boolean isServerRunning()
  {
    boolean isServerRunning;
    if (!lockPathInitialized)
    {
      String lockDirectory = Utils.getPath(Utils.getInstallPathFromClasspath(),
      org.opends.server.util.ServerConstants.LOCKS_DIRECTORY);
      System.setProperty(
        org.opends.server.util.ServerConstants.PROPERTY_LOCK_DIRECTORY,
        lockDirectory);
      lockPathInitialized = true;
    }
    String lockFile =
      org.opends.server.core.LockFileManager.getServerLockFileName();
    StringBuilder failureReason = new StringBuilder();