From 97050c54efee9d0cc89afb5fb61b9a1c67f73f6a Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Wed, 16 Nov 2016 19:28:22 +0000
Subject: [PATCH] OPENDJ-3460 Improve management of subordinate backend and naming contexts
---
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 11d176e..0fa85da 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -1668,7 +1668,8 @@
}
DN entryDN = addOperation.getEntryDN();
- DN parentDnFromEntryDn = DirectoryServer.getParentDNInSuffix(entryDN);
+ DN parentDnFromEntryDn = DirectoryServer.getInstance().getServerContext().getBackendConfigManager()
+ .getParentDNInSuffix(entryDN);
if (parentDnFromEntryDn != null
&& !parentDnFromCtx.equals(parentDnFromEntryDn))
{
@@ -1959,7 +1960,8 @@
final CSN csn = generateCSN(addOperation);
final String entryUUID = getEntryUUID(addOperation);
final AddContext ctx = new AddContext(csn, entryUUID,
- findEntryUUID(DirectoryServer.getParentDNInSuffix(addOperation.getEntryDN())));
+ findEntryUUID(DirectoryServer.getInstance().getServerContext().getBackendConfigManager()
+ .getParentDNInSuffix(addOperation.getEntryDN())));
addOperation.setAttachment(SYNCHROCONTEXT, ctx);
}
@@ -3693,7 +3695,8 @@
*/
private LocalBackend<?> getBackend()
{
- return DirectoryServer.getInstance().getServerContext().getBackendConfigManager().getLocalBackend(getBaseDN());
+ return DirectoryServer.getInstance().getServerContext().getBackendConfigManager()
+ .findLocalBackendForEntry(getBaseDN());
}
/*
@@ -3760,7 +3763,7 @@
}
// Check that the base DN is configured as a base-dn of the directory server
- if (DirectoryServer.getInstance().getServerContext().getBackendConfigManager().getLocalBackend(dn) == null)
+ if (DirectoryServer.getInstance().getServerContext().getBackendConfigManager().findLocalBackendForEntry(dn) == null)
{
unacceptableReasons.add(ERR_UNKNOWN_DN.get(dn));
return false;
--
Gitblit v1.10.0