From f73b655466092169abac34833fb628fce1fcdebe Mon Sep 17 00:00:00 2001
From: jcduff <jcduff@localhost>
Date: Thu, 23 Oct 2008 14:04:24 +0000
Subject: [PATCH] The commit will bring the following features : - An updated version of the underlying database. BDB JE 3.3 is now used. - Attribute API refactoring providing a better abstraction and offering improved performances. - A new GUI called the Control-Panel to replace the Status-Panel: the specifications for this GUI are available on OpenDS Wiki and contains a link to a mockup. See <https://www.opends.org/wiki/page/ControlPanelUISpecification>. - Some changes in the replication protocol to implement "Assured Replication Mode". The specifications are on OpenDS Wiki at <https://www.opends.org/wiki/page/AssuredMode> and section 7 described some of the replication changes required to support this. Assured Replication is not finished, but the main replication protocol changes to support it are done. As explained by Gilles on an email on the Dev mailing list (http://markmail.org/message/46rgo3meq3vriy4a), with these changes the newer versions of OpenDS may not be able to replicate with OpenDS 1.0 instances. - Support for Service Tags on the platforms where the functionality is available and enabled. Specifications are published at <https://www.opends.org/wiki/page/OpenDSServiceTagEnabled>. For more information on Service Tags see <http://wikis.sun.com/display/ServiceTag/Sun+Service+Tag+FAQ>. - The Admin Connector service. In order to provide agentry of the OpenDS server at any time, a new service has been added, dedicated to the administration, configuration and monitoring of the server. An overview of the Admin Connector service and it's use is available on the OpenDS wiki <https://www.opends.org/wiki/page/ManagingAdministrationTrafficToTheServer> - Updates to the various command line tools to support the Admin Connector service. - Some internal re-architecting of the server to put the foundation of future developments such as virtual directory services. The new NetworkGroups and WorkFlow internal services which have been specified in <https://www.opends.org/wiki/page/BasicOperationRoutingThroughNetworkGroup> are now implemented. - Many bug fixes...
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 107 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 86 insertions(+), 21 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 2db04b8..69d8cd3 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -81,6 +81,8 @@
import org.opends.server.config.JMXMBean;
import org.opends.server.controls.PasswordPolicyErrorType;
import org.opends.server.controls.PasswordPolicyResponseControl;
+import org.opends.server.core.networkgroups.NetworkGroup;
+import org.opends.server.core.networkgroups.NetworkGroupConfigManager;
import org.opends.server.extensions.ConfigFileHandler;
import org.opends.server.extensions.JMXAlertHandler;
import static org.opends.server.loggers.AccessLogger.*;
@@ -189,6 +191,7 @@
import org.opends.server.protocols.internal.InternalConnectionHandler;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.crypto.CryptoManagerSync;
+import org.opends.server.servicetag.ServiceTagRegistration;
import static org.opends.messages.ConfigMessages.*;
import javax.management.MBeanServer;
@@ -470,7 +473,7 @@
private ConcurrentHashMap<String,SASLMechanismHandler> saslMechanismHandlers;
// The connection handler configuration manager for the Directory Server.
- private ConnectionHandlerConfigManager connectionHandlerConfigManager;
+ private ConnectionHandlerConfigManager connectionHandlerConfigManager = null;
// The set of alert handlers registered with the Directory Server.
private CopyOnWriteArrayList<AlertHandler> alertHandlers;
@@ -738,6 +741,10 @@
// mode is 'manual'.
private WorkflowElementConfigManager workflowElementConfigManager;
+ // The ServiceTag Registration service for the Directory Server.
+ // The Registration is used to create and register a ServiceTag
+ // if it does not exist in the common servicetag registry.
+ private ServiceTagRegistration serviceTagRegistry;
/**
@@ -1288,6 +1295,11 @@
}
+ // Mark the current time as the start time.
+ startUpTime = System.currentTimeMillis();
+ startTimeUTC = TimeThread.getGMTTime();
+
+
// Determine whether or not we should start the connection handlers.
boolean startConnectionHandlers =
(! environmentConfig.disableConnectionHandlers());
@@ -1329,8 +1341,13 @@
entryCacheConfigManager = new EntryCacheConfigManager();
entryCacheConfigManager.initializeDefaultEntryCache();
+ // Initialize the administration connector.
+ if (startConnectionHandlers)
+ {
+ initializeAdministrationConnector();
+ }
- // Initialize the key manager provider.
+ // Initialize the key manager provider.
keyManagerProviderConfigManager = new KeyManagerProviderConfigManager();
keyManagerProviderConfigManager.initializeKeyManagerProviders();
@@ -1407,7 +1424,8 @@
initializeVirtualAttributes();
- // Initialize all the connection handlers.
+ // Initialize all the connection handlers
+ // (including the administration connector).
if (startConnectionHandlers)
{
initializeConnectionHandlers();
@@ -1449,6 +1467,7 @@
}
+ // Start administration connector and connection handlers
if (startConnectionHandlers)
{
startConnectionHandlers();
@@ -1467,11 +1486,8 @@
}
- // Mark the current time as the start time and indicate that the server is
- // now running.
- startUpTime = System.currentTimeMillis();
- startTimeUTC = TimeThread.getGMTTime();
- isRunning = true;
+ // Indicate that the server is now running.
+ isRunning = true;
Message message = NOTE_DIRECTORY_SERVER_STARTED.get();
logError(message);
@@ -2562,7 +2578,7 @@
* the backends that is not related to the
* server configuration.
*/
- private void initializeBackends()
+ public void initializeBackends()
throws ConfigException, InitializationException
{
backendConfigManager = new BackendConfigManager();
@@ -2809,7 +2825,7 @@
* attempting to initialize and start the
* Directory Server.
*/
- private void configureWorkflowsManual()
+ public void configureWorkflowsManual()
throws ConfigException, InitializationException
{
// First of all re-initialize the current workflow configuration
@@ -2817,6 +2833,10 @@
WorkflowImpl.resetConfig();
directoryServer.workflowElements.clear();
+ // We now need to complete the workflow creation for the
+ // config backend and rootDSE backend.
+ createAndRegisterRemainingWorkflows();
+
// Then configure the workflows
workflowElementConfigManager = new WorkflowElementConfigManager();
workflowElementConfigManager.initializeWorkflowElements();
@@ -2826,10 +2846,6 @@
networkGroupConfigManager = new NetworkGroupConfigManager();
networkGroupConfigManager.initializeNetworkGroups();
-
- // We now need to complete the workflow creation for the
- // config backend and rootDSE backend.
- createAndRegisterRemainingWorkflows();
}
@@ -2849,10 +2865,10 @@
// For each base DN in a backend create a workflow and register
// the workflow with the default network group
- Map<String, Backend> backends = getBackends();
- for (String backendID: backends.keySet())
+ Map<String, Backend> backendMap = getBackends();
+ for (String backendID: backendMap.keySet())
{
- Backend backend = backends.get(backendID);
+ Backend backend = backendMap.get(backendID);
for (DN baseDN: backend.getBaseDNs())
{
WorkflowImpl workflowImpl;
@@ -3053,13 +3069,36 @@
private void initializeConnectionHandlers()
throws ConfigException, InitializationException
{
- connectionHandlerConfigManager = new ConnectionHandlerConfigManager();
+ if (connectionHandlerConfigManager == null) {
+ connectionHandlerConfigManager = new ConnectionHandlerConfigManager();
+ }
connectionHandlerConfigManager.initializeConnectionHandlerConfig();
}
/**
+ * Initializes the administration connector for the Directory Server.
+ *
+ * @throws ConfigException If a configuration problem is identified while
+ * initializing the administration connector.
+ *
+ * @throws InitializationException If a problem occurs while initializing
+ * the administration connector that is not
+ * related to the server configuration.
+ */
+ public void initializeAdministrationConnector()
+ throws ConfigException, InitializationException
+ {
+ if (connectionHandlerConfigManager == null) {
+ connectionHandlerConfigManager = new ConnectionHandlerConfigManager();
+ }
+ connectionHandlerConfigManager.initializeAdministrationConnectorConfig();
+ }
+
+
+
+ /**
* Initializes the set of password policy components for use by the Directory
* Server.
*
@@ -8904,7 +8943,13 @@
throws IOException
{
outputStream.write(getBytes(PRINTABLE_VERSION_STRING));
- return;
+
+ // Print extensions' extra information
+ String extensionInformation =
+ ClassLoaderProvider.getInstance().printExtensionInformation();
+ if ( extensionInformation != null ) {
+ outputStream.write(extensionInformation.getBytes());
+ }
}
@@ -9668,6 +9713,19 @@
System.exit(1);
}
+ try {
+ directoryServer.serviceTagRegistry =
+ ServiceTagRegistration.getRegistrationService();
+ directoryServer.serviceTagRegistry.registerServiceTags("Server");
+ }
+ catch(Exception ex) {
+ // ServiceTags Registration errors do not prevent the server to
+ // start. WARNING logged in debug mode
+ if (debugEnabled()) {
+ TRACER.debugCaught(DebugLogLevel.WARNING, ex);
+ }
+ }
+
try
{
directoryServer.startServer();
@@ -9689,8 +9747,8 @@
TRACER.debugCaught(DebugLogLevel.ERROR, ce);
}
- Message message = ERR_DSCORE_CANNOT_START.get(ce.getMessage()
- + " " + ce.getCause().getLocalizedMessage());
+ Message message = ERR_DSCORE_CANNOT_START.get(ce.getMessage() +
+ (ce.getCause() != null ? " " + ce.getCause().getLocalizedMessage() : ""));
shutDown(directoryServer.getClass().getName(), message);
}
catch (Exception e)
@@ -10093,6 +10151,13 @@
System.out.println(SetupUtils.INCOMPATIBILITY_EVENTS+separator+
StaticUtils.listToString(
VersionCompatibilityIssue.getAllEvents(), ","));
+
+ // Print extensions' extra information
+ String extensionInformation =
+ ClassLoaderProvider.getInstance().printExtensionInformation();
+ if ( extensionInformation != null ) {
+ System.out.print(extensionInformation);
+ }
}
}
--
Gitblit v1.10.0