From a5ce1b53bf9304c08bb51639b48bb77085cd62b3 Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Sun, 02 Sep 2007 04:00:42 +0000
Subject: [PATCH] There are several improvements to the unit test framework in this commit.
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index c5efb40..a6528b2 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -73,6 +73,7 @@
import org.opends.server.api.AccessLogPublisher;
import org.opends.server.api.ErrorLogPublisher;
import org.opends.server.api.DebugLogPublisher;
+import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.plugin.PluginType;
import org.opends.server.api.plugin.StartupPluginResult;
import org.opends.server.backends.RootDSEBackend;
@@ -187,6 +188,8 @@
import org.opends.server.util.args.StringArgument;
import org.opends.server.workflowelement.*;
import org.opends.server.workflowelement.localbackend.*;
+import org.opends.server.protocols.internal.InternalConnectionHandler;
+import org.opends.server.protocols.internal.InternalClientConnection;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
@@ -1461,6 +1464,8 @@
removeErrorLogPublisher(startupErrorLogPublisher);
}
+ // Force the root connection to be initialized.
+ InternalClientConnection.getRootConnection();
// If a server.starting file exists, then remove it.
File serverStartingFile =
@@ -8151,6 +8156,12 @@
directoryServer.shuttingDown = true;
}
+ ConfigEntry rootConfigEntry = null;
+ try {
+ rootConfigEntry = directoryServer.configHandler.getConfigRootEntry();
+ } catch (Exception e) {
+
+ }
// Send an alert notification that the server is shutting down.
Message message = NOTE_SERVER_SHUTDOWN.get(className, reason);
@@ -8311,6 +8322,13 @@
DirectoryServer.deregisterPasswordPolicy(configEntryDN);
}
+ // Finalize the access control handler
+ AccessControlHandler accessControlHandler =
+ AccessControlConfigManager.getInstance().getAccessControlHandler();
+ if (accessControlHandler != null)
+ {
+ accessControlHandler.finalizeAccessControlHandler();
+ }
// Perform any necessary cleanup work for the group manager.
if (directoryServer.groupManager != null)
@@ -8421,10 +8439,14 @@
logError(message);
}
+ // Deregister all workflows.
+ WorkflowImpl.deregisterAllOnShutdown();
// Deregister all network group configuration.
- NetworkGroup.deregisterAll();
+ NetworkGroup.deregisterAllOnShutdown();
+ // Force a new InternalClientConnection to be created on restart.
+ InternalConnectionHandler.clearRootClientConnectionAtShutdown();
// Log a final message indicating that the server is stopped (which should
// be true for all practical purposes), and then shut down all the error
--
Gitblit v1.10.0