From 9fa1aa8315996dc555e9921a1c77979e07050878 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 29 Jun 2016 15:48:26 +0000
Subject: [PATCH] Partial OPENDJ-2625 Convert all code that uses JNDI to use the SDK instead

---
 opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
index 20edf68..37f01a1 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -2015,7 +2015,7 @@
     List<TaskEntry> taskEntries = new ArrayList<>();
     List<Exception> exceptions = new ArrayList<>();
     ConfigFromDirContext cfg = new ConfigFromDirContext();
-    cfg.updateTaskInformation(conn.getLdapContext(), exceptions, taskEntries);
+    cfg.updateTaskInformation(conn, exceptions, taskEntries);
     for (Exception ode : exceptions)
     {
       logger.warn(LocalizableMessage.raw("Error retrieving task entries: "+ode, ode));
@@ -5839,8 +5839,8 @@
           }
         }
       }
-      String bindDn = getBindDN(conn.getLdapContext());
-      String pwd = getBindPassword(conn.getLdapContext());
+      String bindDn = conn.getBindDn().toString();
+      String pwd = conn.getBindPassword();
       for (ServerDescriptor s : serversToUpdate)
       {
         removeReferencesInServer(s, replicationServerHostPort, bindDn, pwd,
@@ -5850,11 +5850,10 @@
 
       if (disableReplicationServer)
       {
-        // Disable replication server
         disableReplicationServer(conn);
         replicationServerDisabled = true;
-        // Wait to be sure that changes are taken into account and reset the
-        // contents of the ADS.
+        // Wait to be sure that changes are taken into account
+        // and reset the contents of the ADS.
         sleepCatchInterrupt(5000);
       }
     }

--
Gitblit v1.10.0