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

chebrard
13.46.2009 ab3c14485488c297b3e5182662f2103c1f5ebc35
Fix 3711: Unable to remotely debug the server

CheckInstance no longer calls 'start-ds -F' but uses same classes as start-ds to
generate the version of the install dir.
Move the configurator package from src/quicksetup to src/server/tools.


3 files renamed
2 files modified
58 ■■■■ changed files
opends/resource/bin/_script-util.sh 4 ●●●● patch | view | raw | blame | history
opends/resource/configure 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/configurator/CheckInstance.java 44 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/configurator/Configurator.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/configurator/package-info.java 4 ●●●● patch | view | raw | blame | history
opends/resource/bin/_script-util.sh
@@ -23,7 +23,7 @@
# CDDL HEADER END
#
#
#      Copyright 2008 Sun Microsystems, Inc.
#      Copyright 2009 Sun Microsystems, Inc.
#
# function that sets the java home
@@ -295,7 +295,7 @@
      OPT_CHECK_VERSION=""
      fi
  # Launch the CheckInstance process.
      "${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} -DINSTANCE_ROOT=${INSTANCE_ROOT} org.opends.quicksetup.configurator.CheckInstance --currentUser ${CURRENT_USER} ${OPT_CHECK_VERSION}
      "${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} -DINSTANCE_ROOT=${INSTANCE_ROOT} org.opends.server.tools.configurator.CheckInstance --currentUser ${CURRENT_USER} ${OPT_CHECK_VERSION}
  # return part
      RETURN_CODE=$?
      if [ ${RETURN_CODE} -ne 0 ]
opends/resource/configure
@@ -53,7 +53,7 @@
fi
# Launch the configure process.
"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} org.opends.quicksetup.configurator.Configurator "${@}"
"${OPENDS_JAVA_BIN}" ${OPENDS_JAVA_ARGS} ${SCRIPT_NAME_ARG} -DINSTALL_ROOT=${INSTALL_ROOT} org.opends.server.tools.configurator.Configurator "${@}"
# return part
RETURN_CODE=$?
opends/src/server/org/opends/server/tools/configurator/CheckInstance.java
File was renamed from opends/src/quicksetup/org/opends/quicksetup/configurator/CheckInstance.java
@@ -22,12 +22,14 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.quicksetup.configurator;
package org.opends.server.tools.configurator;
import java.io.File;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import org.opends.quicksetup.ReturnCode;
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.args.ArgumentParser;
@@ -36,7 +38,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import org.opends.messages.Message;
import org.opends.quicksetup.ApplicationException;
import org.opends.quicksetup.Installation;
import org.opends.server.util.args.BooleanArgument;
import java.util.StringTokenizer;
@@ -47,6 +48,8 @@
import static org.opends.server.tools.ToolConstants.*;
import static org.opends.messages.QuickSetupMessages.*;
import static org.opends.server.util.DynamicConstants.*;
/**
 * This class is called by the configure command line to move the default
 * Directory Server instance.
@@ -217,18 +220,39 @@
    // Check version
    if (checkVersionArg.isPresent()) {
        BuildInformation installBi =
                  BuildInformation.fromBuildString(VERSION_NUMBER_STRING +
                                                   "." + REVISION_NUMBER);
      BuildInformation instanceBi = installBi;
      try {
        BuildInformation installBi = installation.getBuildInformation();
        BuildInformation instanceBi = installation.
                getInstanceBuildInformation();
        File bif = new File(installation.getConfigurationDirectory(),
          Installation.BUILDINFO_RELATIVE_PATH);
        if (bif.exists()) {
          BufferedReader breader = new BufferedReader(new FileReader(bif));
          // Read the first line and close the file.
          String line;
          try {
            line = breader.readLine();
            instanceBi = BuildInformation.fromBuildString(line);
          } finally {
            try {
              breader.close();
            } catch (Exception e) {
            }
          }
        }
      } catch (Exception e) {
        LOG.log(Level.SEVERE, "error getting build information for " +
                "current instance", e);
      }
        if (!installBi.equals(instanceBi)) {
          System.err.println(ERR_CHECK_VERSION_NOT_MATCH.get());
          System.exit(VERSION_ERROR);
        }
      } catch (ApplicationException ae) {
        System.err.println(ae.getMessageObject());
        System.exit(ReturnCode.APPLICATION_ERROR.getReturnCode());
      }
    } else {
      LOG.log(Level.FINEST, "checkVersion not specified");
    }
opends/src/server/org/opends/server/tools/configurator/Configurator.java
File was renamed from opends/src/quicksetup/org/opends/quicksetup/configurator/Configurator.java
@@ -22,9 +22,9 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.quicksetup.configurator;
package org.opends.server.tools.configurator;
import java.io.File;
import java.io.FileWriter;
opends/src/server/org/opends/server/tools/configurator/package-info.java
File was renamed from opends/src/quicksetup/org/opends/quicksetup/configurator/package-info.java
@@ -22,10 +22,10 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Copyright 2009 Sun Microsystems, Inc.
 */
/**
 * Defines the specific classes that are used by the configurator.
 */
package org.opends.quicksetup.configurator;
package org.opends.server.tools.configurator;