From 48e73e27e5a6b254471fabeefa3a197dd071c1b8 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 02 Oct 2006 16:32:07 +0000
Subject: [PATCH] Perform significant refactoring in the core and plugin code in order to help make it easier for external developers to extend OpenDS. In particular, this is a big step towards eliminating the need for developers to reference anything in the core package, and it's also a signficant simplification to the plugin API because it helps expose which operation methods are safe to call at various points in the plugin processing.
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 34 ++++++++++++++++++++--------------
1 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index de68210..1472dc5 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -123,19 +123,24 @@
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeUsage;
import org.opends.server.types.AttributeValue;
+import org.opends.server.types.CryptoManager;
+import org.opends.server.types.DirectoryException;
import org.opends.server.types.DITContentRule;
import org.opends.server.types.DITStructureRule;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.InitializationException;
import org.opends.server.types.MatchingRuleUse;
import org.opends.server.types.NameForm;
import org.opends.server.types.ObjectClass;
import org.opends.server.types.ObjectClassType;
import org.opends.server.types.OperatingSystem;
+import org.opends.server.types.OperationType;
import org.opends.server.types.RDN;
import org.opends.server.types.ResultCode;
+import org.opends.server.types.Schema;
import org.opends.server.types.WritabilityMode;
import org.opends.server.util.TimeThread;
import org.opends.server.util.args.ArgumentException;
@@ -996,6 +1001,10 @@
synchronizationProviderConfigManager.initializeSynchronizationProviders();
+ // Create and initialize the work queue.
+ initializeWorkQueue();
+
+
StartupPluginResult startupPluginResult =
pluginConfigManager.invokeStartupPlugins();
if (! startupPluginResult.continueStartup())
@@ -1008,10 +1017,6 @@
}
- // Create and initialize the work queue.
- initializeWorkQueue();
-
-
// At this point, we should be ready to go. Start all the connection
// handlers.
for (ConnectionHandler c : connectionHandlers)
@@ -6683,6 +6688,17 @@
}
directoryServer.connectionHandlers.clear();
+
+
+ // Call the shutdown plugins, and then finalize all the plugins defined in
+ // the server.
+ if (directoryServer.pluginConfigManager != null)
+ {
+ directoryServer.pluginConfigManager.invokeShutdownPlugins();
+ directoryServer.pluginConfigManager.finalizePlugins();
+ }
+
+
// shutdown the Synchronization Providers
for (SynchronizationProvider provider :
directoryServer.synchronizationProviders)
@@ -6720,16 +6736,6 @@
}
-
- // Call the shutdown plugins, and then finalize all the plugins defined in
- // the server.
- if (directoryServer.pluginConfigManager != null)
- {
- directoryServer.pluginConfigManager.invokeShutdownPlugins();
- directoryServer.pluginConfigManager.finalizePlugins();
- }
-
-
// Shut down all of the alert handlers.
for (AlertHandler alertHandler : directoryServer.alertHandlers)
{
--
Gitblit v1.10.0