From 07572b1a1f310425277e769bc497f2256121f192 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Tue, 15 May 2007 20:32:42 +0000
Subject: [PATCH] This commit removes the Web Start version of the upgrader's ability to download arbitrary builds to be used for upgrading. Instead, the Web Start version of upgrade will be tied to the build version of upgrader. This is necessary after discovering that attemping to perform internal communication with the directory server when the DS bit and the upgraders bits are of different versions is problematic.
---
opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java | 31 +++++++++++++++++++++++++++++--
1 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java b/opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java
index 7e55038..319982d 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java
@@ -76,9 +76,36 @@
* Creates a new instance that will operate on <code>application</code>'s
* installation.
* @param installation representing the server instance to control
+ * @throws IllegalStateException if the the version of the OpenDS code
+ * running in this JVM is not the same version as the code whose bits
+ * are stored in <code>installation</code>.
*/
- public InProcessServerController(Installation installation) {
- this.installation = installation;
+ public InProcessServerController(Installation installation)
+ throws IllegalStateException
+ {
+
+ // Attempting to use DirectoryServer with a configuration file
+ // for a different version of the server can cause problems for
+ // the server at startup.
+ BuildInformation installBi = null;
+ BuildInformation currentBi = null;
+ try {
+ installBi = installation.getBuildInformation();
+ currentBi = BuildInformation.getCurrent();
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to verify the build version of " +
+ "the " + installation + " matches the currently executing " +
+ "version.");
+ }
+
+ if (!currentBi.equals(installBi)) {
+ throw new IllegalStateException("The build version of the " +
+ "installation " + installation + " is " + installBi +
+ " and does not match the currently executing version " +
+ currentBi);
+ }
+
+ this.installation=installation;
}
/**
--
Gitblit v1.10.0