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/BackupBackend.java | 63 +++++++++++--------------------
1 files changed, 22 insertions(+), 41 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/BackupBackend.java b/opends/src/server/org/opends/server/backends/BackupBackend.java
index fda38ea..0576804 100644
--- a/opends/src/server/org/opends/server/backends/BackupBackend.java
+++ b/opends/src/server/org/opends/server/backends/BackupBackend.java
@@ -275,7 +275,19 @@
// Register the backup base as a private suffix.
- DirectoryServer.registerPrivateSuffix(backupBaseDN, this);
+ try
+ {
+ DirectoryServer.registerBaseDN(backupBaseDN, this, true, false);
+ }
+ catch (Exception e)
+ {
+ assert debugException(CLASS_NAME, "initializeBackend", e);
+
+ msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
+ String message = getMessage(msgID, backupBaseDN.toString(),
+ stackTraceToSingleLineString(e));
+ throw new InitializationException(msgID, message, e);
+ }
}
@@ -296,6 +308,15 @@
assert debugEnter(CLASS_NAME, "finalizeBackend");
DirectoryServer.deregisterConfigurableComponent(this);
+
+ try
+ {
+ DirectoryServer.deregisterBaseDN(backupBaseDN, false);
+ }
+ catch (Exception e)
+ {
+ assert debugException(CLASS_NAME, "finalizeBackend", e);
+ }
}
@@ -1029,26 +1050,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.
@@ -1063,26 +1064,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