From 5be072c20e46f0921bb00401ff26d0defb3e8991 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Tue, 05 Dec 2006 21:41:50 +0000
Subject: [PATCH] Update the base DN registration process to address a number of issues:

---
 opends/src/server/org/opends/server/backends/task/TaskBackend.java |   63 +++++++++++--------------------
 1 files changed, 22 insertions(+), 41 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/task/TaskBackend.java b/opends/src/server/org/opends/server/backends/task/TaskBackend.java
index 8e4783d..5fcbf15 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskBackend.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -336,7 +336,19 @@
 
 
     // Register the task base as a private suffix.
-    DirectoryServer.registerPrivateSuffix(baseDNs[0], this);
+    try
+    {
+      DirectoryServer.registerBaseDN(taskRootDN, this, true, false);
+    }
+    catch (Exception e)
+    {
+      assert debugException(CLASS_NAME, "initializeBackend", e);
+
+      msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
+      String message = getMessage(msgID, taskRootDN.toString(),
+                                  stackTraceToSingleLineString(e));
+      throw new InitializationException(msgID, message, e);
+    }
   }
 
 
@@ -381,6 +393,15 @@
     {
       assert debugException(CLASS_NAME, "finalizeBackend", e);
     }
+
+    try
+    {
+      DirectoryServer.deregisterBaseDN(taskRootDN, false);
+    }
+    catch (Exception e)
+    {
+      assert debugException(CLASS_NAME, "finalizeBackend", e);
+    }
   }
 
 
@@ -971,26 +992,6 @@
 
 
   /**
-   * Indicates whether this backend supports the specified control.
-   *
-   * @param  controlOID  The OID of the control for which to make the
-   *                     determination.
-   *
-   * @return  <CODE>true</CODE> if this backend does support the requested
-   *          control, or <CODE>false</CODE>
-   */
-  public boolean supportsControl(String controlOID)
-  {
-    assert debugEnter(CLASS_NAME, "supportsControl",
-                      String.valueOf(controlOID));
-
-    // This backend does not provide any special control support.
-    return false;
-  }
-
-
-
-  /**
    * Retrieves the OIDs of the features that may be supported by this backend.
    *
    * @return  The OIDs of the features that may be supported by this backend.
@@ -1005,26 +1006,6 @@
 
 
   /**
-   * Indicates whether this backend supports the specified feature.
-   *
-   * @param  featureOID  The OID of the feature for which to make the
-   *                     determination.
-   *
-   * @return  <CODE>true</CODE> if this backend does support the requested
-   *          feature, or <CODE>false</CODE>
-   */
-  public boolean supportsFeature(String featureOID)
-  {
-    assert debugEnter(CLASS_NAME, "supportsFeature",
-                      String.valueOf(featureOID));
-
-    // This backend does not provide any special feature support.
-    return false;
-  }
-
-
-
-  /**
    * Indicates whether this backend provides a mechanism to export the data it
    * contains to an LDIF file.
    *

--
Gitblit v1.10.0