From 5d6e9428fedead57a9c9438cebe58b485ff476d2 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 14 Sep 2007 10:22:17 +0000
Subject: [PATCH] Avoid managed object definition initialization dependency problems. Using features like inherited default values and aggregation properties it is quite straightforward to encounter initialization dependency problems. For example: the global configuration will contain an aggregation property which references the default password policy. This aggregation definition is defined using a managed object path which, when decoded, contains a reference to the root configuration and its "password-policy" relation. This is what happens during initialization of the root configuration:

---
 opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java b/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
index 881e140..67e8249 100644
--- a/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
+++ b/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
@@ -713,6 +713,23 @@
 
 
   /**
+   * Initializes all of the property definitions associated with this
+   * managed object definition.
+   *
+   * @throws Exception
+   *           If this managed object definition could not be
+   *           initialized.
+   */
+  protected final void initialize() throws Exception {
+    for (PropertyDefinition<?> pd : getAllPropertyDefinitions()) {
+      pd.initialize();
+      pd.getDefaultBehaviorProvider().initialize();
+    }
+  }
+
+
+
+  /**
    * Register a constraint with the managed object definition.
    * <p>
    * This method <b>must not</b> be called by applications.

--
Gitblit v1.10.0