From 0bbb2f7f7f74de8b6a43523c88ae7eb8ff8b5e54 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 11 Mar 2014 09:41:21 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1308 Migrate schema support

---
 opendj3-server-dev/src/server/org/opends/server/util/EmbeddedUtils.java |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/util/EmbeddedUtils.java b/opendj3-server-dev/src/server/org/opends/server/util/EmbeddedUtils.java
index c141c68..112569f 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/EmbeddedUtils.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/EmbeddedUtils.java
@@ -28,12 +28,13 @@
 
 
 
-import org.opends.server.config.ConfigException;
+import org.forgerock.opendj.config.server.ConfigException;
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.types.DirectoryEnvironmentConfig;
 import org.opends.server.types.InitializationException;
 
 import static org.opends.messages.UtilityMessages.*;
+
 import org.forgerock.i18n.LocalizableMessage;
 
 
@@ -68,15 +69,12 @@
    *
    * @param  config  The environment configuration to use for the server.
    *
-   * @throws  ConfigException  If a configuration problem is detected during
-   *                           the server initialization or startup process.
-   *
    * @throws  InitializationException  If the Directory Server is already
    *                                   running, or if an error occurs during
    *                                   server initialization or startup.
    */
   public static void startServer(DirectoryEnvironmentConfig config)
-         throws ConfigException, InitializationException
+         throws InitializationException
   {
     if (DirectoryServer.isRunning())
     {
@@ -85,7 +83,14 @@
     }
 
     DirectoryServer directoryServer = DirectoryServer.reinitialize(config);
-    directoryServer.startServer();
+    try
+    {
+      directoryServer.startServer();
+    }
+    catch (ConfigException e)
+    {
+      throw new InitializationException(e.getMessageObject(), e);
+    }
   }
 
 
@@ -130,7 +135,7 @@
    */
   public static void initializeForClientUse()
   {
-    DirectoryServer directoryServer = DirectoryServer.getInstance();
+    DirectoryServer.getInstance();
     DirectoryServer.bootstrapClient();
   }
 }

--
Gitblit v1.10.0