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

neil_a_wilson
23.44.2006 9aca206b3757d8d7bccae4b2912f403eb67b3446
Update the OpenDS setup process to add a "Please wait while the server
initializes...." message at the beginning of the process which can make any
delays introduced by the initial configuration and schema processing more
palatable to the end user.

This also updates the setup.sh shell script so that it will attempt to use the
client VM under certain circumstances, since we have found that the client VM
does significantly reduce the startup time in many cases. It should continue
to work properly in other VMs that may not support the "-client" option.

OpenDS Issue Number: 594
3 files modified
37 ■■■■■ changed files
opends/resource/setup.sh 19 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/ToolMessages.java 13 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/InstallDS.java 5 ●●●●● patch | view | raw | blame | history
opends/resource/setup.sh
@@ -69,13 +69,30 @@
# Determine whether the detected Java environment is acceptable for use.
${JAVA_BIN} ${JAVA_ARGS} org.opends.server.tools.InstallDS -t
if test -z "${JAVA_ARGS}"
then
  ${JAVA_BIN} -client org.opends.server.tools.InstallDS -t 2> /dev/null
  if test $? -eq 0
  then
    JAVA_ARGS="-client"
  else
    ${JAVA_BIN} org.opends.server.tools.InstallDS -t 2> /dev/null
if test $? -ne 0
then
  echo "ERROR:  The detected Java version could not be used.  Please set "
  echo "        JAVA_HOME to the root of a Java 5.0 installation."
  exit 1
fi
  fi
else
  ${JAVA_BIN} ${JAVA_ARGS} org.opends.server.tools.InstallDS -t 2> /dev/null
  if test $? -ne 0
  then
    echo "ERROR:  The detected Java version could not be used.  Please set "
    echo "        JAVA_HOME to the root of a Java 5.0 installation."
    exit 1
  fi
fi
${JAVA_BIN} ${JAVA_ARGS} org.opends.server.tools.InstallDS \
opends/src/server/org/opends/server/messages/ToolMessages.java
@@ -5222,6 +5222,17 @@
  /**
   * The message ID for the message that will be used if the user did not
   * specify the path to the Directory Server configuration file.  This takes a
   * single argument, which is the name of the command-line option that should
   * be used to provide that information.
   */
  public static final int MSGID_INSTALLDS_INITIALIZING =
       CATEGORY_MASK_TOOLS | SEVERITY_MASK_INFORMATIONAL | 534;
  /**
   * Associates a set of generic messages with the message IDs defined in this
   * class.
   */
@@ -6851,6 +6862,8 @@
    registerMessage(MSGID_INSTALLDS_NO_CONFIG_FILE,
                    "ERROR:  No configuration file path was provided (use " +
                    "the %s argument).");
    registerMessage(MSGID_INSTALLDS_INITIALIZING,
                    "Please wait while the setup program initializes....");
    registerMessage(MSGID_INSTALLDS_CANNOT_INITIALIZE_JMX,
                    "An error occurred while attempting to initialize the " +
                    "Directory Server JMX subsystem based on the information " +
opends/src/server/org/opends/server/tools/InstallDS.java
@@ -304,6 +304,11 @@
    if (! silentInstall.isPresent())
    {
      System.out.println(versionString);
      System.out.println();
      int    msgID   = MSGID_INSTALLDS_INITIALIZING;
      String message = getMessage(msgID);
      System.out.println(wrapText(message, MAX_LINE_WIDTH));
    }