From d660328ffe2ad59ccf30b281ec02b3cf718f1c76 Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Fri, 20 Mar 2009 17:16:34 +0000
Subject: [PATCH] - [Issue 3827] unable to enable NDB backend dynamically with dsconfig : make sure root virtual attributes are initialized before backends initialization takes places; fix virtual attributes stripping.
---
opends/src/server/org/opends/server/backends/ndb/BackendImpl.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/ndb/BackendImpl.java b/opends/src/server/org/opends/server/backends/ndb/BackendImpl.java
index 2f7d84a..a5c24eb 100644
--- a/opends/src/server/org/opends/server/backends/ndb/BackendImpl.java
+++ b/opends/src/server/org/opends/server/backends/ndb/BackendImpl.java
@@ -64,6 +64,7 @@
import org.opends.server.admin.Configuration;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.GlobalCfgDefn.WorkflowConfigurationMode;
+import org.opends.server.admin.std.meta.VirtualAttributeCfgDefn;
import org.opends.server.admin.std.server.NdbBackendCfg;
import org.opends.server.admin.std.server.NdbIndexCfg;
import org.opends.server.backends.SchemaBackend;
@@ -581,13 +582,18 @@
operationalAttributes.add(attrName);
}
}
+
// Strip virtual attributes.
for (VirtualAttributeRule rule :
DirectoryServer.getVirtualAttributes())
{
- String attrName = rule.getAttributeType().getNameOrOID();
- if (operationalAttributes.contains(attrName)) {
- operationalAttributes.remove(attrName);
+ if (rule.getConflictBehavior() ==
+ VirtualAttributeCfgDefn.ConflictBehavior.VIRTUAL_OVERRIDES_REAL)
+ {
+ String attrName = rule.getAttributeType().getNameOrOID();
+ if (operationalAttributes.contains(attrName)) {
+ operationalAttributes.remove(attrName);
+ }
}
}
--
Gitblit v1.10.0