From 0418e30716942bc043d20cf1580391f44b2cb73e Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Tue, 25 Sep 2007 18:38:03 +0000
Subject: [PATCH] These changes use the new LDIF backend implementation so that the adminRoot backend is always present. The adminRoot LDIF backend is initially populated with the admin container entries, except for the cn=Servers container. To avoid breaking the setup and dsreplication tools, I have changed things so that the absence of the cn=Servers container entry implies that the server is not yet configured as an ADS server. I have commented out code that is no longer applicable.
---
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java b/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
index 8246061..21d34c3 100644
--- a/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
+++ b/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
@@ -2135,6 +2135,14 @@
}
/**
+ * Helper type for the <CODE>getCommonSuffixes</CODE> method.
+ */
+ private enum SuffixRelationType
+ {
+ NOT_REPLICATED, FULLY_REPLICATED, REPLICATED, NOT_FULLY_REPLICATED, ALL
+ }
+
+ /**
* Returns a Collection containing a list of suffixes that are defined in
* two servers at the same time (depending on the value of the argument
* replicated this list contains only the suffixes that are replicated
@@ -2148,10 +2156,6 @@
* @return a Collection containing a list of suffixes that are replicated
* (or those that can be replicated) in two servers.
*/
- private enum SuffixRelationType
- {
- NOT_REPLICATED, FULLY_REPLICATED, REPLICATED, NOT_FULLY_REPLICATED, ALL
- };
private Collection<String> getCommonSuffixes(
InitialLdapContext ctx1, InitialLdapContext ctx2, SuffixRelationType type)
{
@@ -3296,7 +3300,7 @@
}
else if (!adsCtx1.hasAdminData() && adsCtx2.hasAdminData())
{
- adsCtx1.createAdministrationSuffix(null);
+// adsCtx1.createAdministrationSuffix(null);
if (!hasAdministrator(adsCtx2.getDirContext()))
{
adsCtx2.createAdministrator(getAdministratorProperties(uData));
@@ -3310,7 +3314,7 @@
}
else if (adsCtx1.hasAdminData() && !adsCtx2.hasAdminData())
{
- adsCtx2.createAdministrationSuffix(null);
+// adsCtx2.createAdministrationSuffix(null);
if (!hasAdministrator(adsCtx1.getDirContext()))
{
adsCtx1.createAdministrator(getAdministratorProperties(uData));
@@ -3330,7 +3334,7 @@
adsCtx1.registerServer(server1.getAdsProperties());
server2.updateAdsPropertiesWithServerProperties();
adsCtx1.registerServer(server2.getAdsProperties());
- adsCtx2.createAdministrationSuffix(null);
+// adsCtx2.createAdministrationSuffix(null);
ctxSource = ctx1;
ctxDestination = ctx2;
@@ -3340,7 +3344,7 @@
catch (ADSContextException adce)
{
throw new ReplicationCliException(
- ERR_REPLICATION_UPDATING_ADS.get(adce.getMessage()),
+ ERR_REPLICATION_UPDATING_ADS.get(adce.getReason()),
ERROR_UPDATING_ADS, adce);
}
if (!adsAlreadyReplicated)
--
Gitblit v1.10.0