From 7c30dbb5403772b323df3ad907d9ed15d23b5aee Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Thu, 29 Apr 2010 20:35:40 +0000
Subject: [PATCH] Last batch of changes for this week. This adds support for the IETF based Password Policy for LDAP as SubEntry. Also resolves the following issues : - 4544 :  initializeBackend() should not set JE env config params directly. - 4478 : ECL in draft compat mode / search lastchangenumber can be very long - 4538 : Virtual attributes not retrieved when entry cache configured - 4547 : Search Filter Matching differ for cn=Directory Manager and plain user. - 4514 : Logs shows unexpected message with replication monitoring data missing (Partial fix) - 4534 : Replication using security does not work after server restart - 4516 : SEVERE_ERROR: servers (...) have the same ServerId In addition, they also improve reliability and performance in various areas including CollectiveAttributes, Virtual Attributes and Subentries management, Schema loading, Replication...

---
 opends/src/server/org/opends/server/core/DirectoryServer.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 48 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 3f3659d..c697851 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Copyright 2006-2010 Sun Microsystems, Inc.
  */
 package org.opends.server.core;
 
@@ -1424,11 +1424,7 @@
 
 
       // Initialize the subentry manager.
-      subentryManager = new SubentryManager();
-      // The configuration backend has already been registered at this point
-      // so we need to handle it explicitly.
-      subentryManager.performBackendInitializationProcessing(configHandler);
-
+      initializeSubentryManager();
 
       // Initialize the group manager.
       initializeGroupManager();
@@ -2867,6 +2863,41 @@
 
 
   /**
+   * Initializes the subentry manager for the Directory Server.
+   * Note that the subentry manager initialization should be
+   * done before any dependent components initialization and
+   * before bringing any backends online. Configuration backend
+   * is a special case and therefore is exception to this rule.
+   *
+   * @throws InitializationException If a problem occurs while
+   *                                 initializing the subentry
+   *                                 manager.
+   */
+  public void initializeSubentryManager()
+          throws InitializationException
+  {
+    try
+    {
+      subentryManager = new SubentryManager();
+      // The configuration backend should already be registered
+      // at this point so we need to handle it explicitly here.
+      subentryManager.performBackendInitializationProcessing(
+              configHandler);
+    }
+    catch (DirectoryException de)
+    {
+      if (debugEnabled())
+      {
+        TRACER.debugCaught(DebugLogLevel.ERROR, de);
+      }
+
+      throw new InitializationException(de.getMessageObject());
+    }
+  }
+
+
+
+  /**
    * Initializes the set of password policy components for use by the Directory
    * Server.
    *
@@ -8291,6 +8322,12 @@
       DirectoryServer.deregisterPasswordPolicy(configEntryDN);
     }
 
+    // Finalize password policies and their config manager.
+    if (directoryServer.passwordPolicyConfigManager != null)
+    {
+      directoryServer.passwordPolicyConfigManager.finalizePasswordPolicies();
+    }
+
     // Finalize the access control handler
     AccessControlHandler accessControlHandler =
         AccessControlConfigManager.getInstance().getAccessControlHandler();
@@ -8305,6 +8342,11 @@
       directoryServer.groupManager.finalizeGroupManager();
     }
 
+    // Finalize the subentry manager.
+    if (directoryServer.subentryManager != null)
+    {
+      directoryServer.subentryManager.finalizeSubentryManager();
+    }
 
     // Shut down all the other components that may need special handling.
     // NYI

--
Gitblit v1.10.0