mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
30.38.2014 473e684067fcf03dd99666e033f61541fa8c5e62
OPENDJ-1454 Remove all code supporting "dc=replicationChanges"

Done. Removed a lot of code.
Noticeable changes:


ReplicationCliMain.java:
Extracted a few methods to factorize code.

GenerationIdTest.java:
Please note the strange case of checkChangelogSize().
1 files deleted
25 files modified
2504 ■■■■■ changed files
opendj3-server-dev/resource/config/config.ldif 1 ●●●● patch | view | raw | blame | history
opendj3-server-dev/resource/man/man1/list-backends.1 1 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java 20 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java 5 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/main/docbkx/admin-guide/man-list-backends.xml 1 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication.properties 9 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_de.properties 5 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_es.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_fr.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_ja.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_ko.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_zh_CN.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/messages/messages/replication_zh_TW.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/quicksetup/org/opends/quicksetup/Constants.java 6 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java 5 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java 1309 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServer.java 189 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 33 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java 34 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 49 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java 15 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java 288 ●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java 53 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java 8 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java 444 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/resource/config/config.ldif
@@ -97,7 +97,6 @@
ds-cfg-global-aci: (target="ldap:///cn=schema")(targetscope="base")(targetattr="objectClass||attributeTypes||dITContentRules||dITStructureRules||ldapSyntaxes||matchingRules||matchingRuleUse||nameForms||objectClasses")(version 3.0; acl "User-Visible Schema Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";)
ds-cfg-global-aci: (target="ldap:///")(targetscope="base")(targetattr="objectClass||namingContexts||supportedAuthPasswordSchemes||supportedControl||supportedExtension||supportedFeatures||supportedLDAPVersion||supportedSASLMechanisms||supportedTLSCiphers||supportedTLSProtocols||vendorName||vendorVersion")(version 3.0; acl "User-Visible Root DSE Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";)
ds-cfg-global-aci: (targetattr="createTimestamp||creatorsName||modifiersName||modifyTimestamp||entryDN||entryUUID||subschemaSubentry||etag||governingStructureRule||structuralObjectClass||hasSubordinates||numSubordinates")(version 3.0; acl "User-Visible Operational Attributes"; allow (read,search,compare) userdn="ldap:///anyone";)
ds-cfg-global-aci: (target="ldap:///dc=replicationchanges")(targetattr="*")(version 3.0; acl "Replication backend access"; deny (all) userdn="ldap:///anyone";)
cn: Access Control Handler
ds-cfg-java-class: org.opends.server.authorization.dseecompat.AciHandler
ds-cfg-enabled: true
opendj3-server-dev/resource/man/man1/list-backends.1
@@ -85,7 +85,6 @@
monitor            : cn=monitor
myCompanyRoot      : "dc=myCompany,dc=com"
myOrgRoot          : o=myOrg
replicationChanges : dc=replicationChanges
schema             : cn=schema
tasks              : cn=tasks
userRoot           : "dc=example,dc=com"
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
@@ -24,7 +24,6 @@
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.guitools.controlpanel.browser;
import java.awt.Font;
@@ -73,7 +72,6 @@
import org.opends.guitools.controlpanel.ui.renderer.BrowserCellRenderer;
import org.opends.guitools.controlpanel.util.NumSubordinateHacker;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.quicksetup.Constants;
import org.opends.server.config.ConfigConstants;
import org.opends.server.types.LDAPURL;
import org.opends.server.util.ServerConstants;
@@ -121,9 +119,9 @@
  private boolean showAttributeName;
  private InitialLdapContext ctxConfiguration;
  private InitialLdapContext ctxUserData;
  boolean followReferrals;
  boolean sorted;
  boolean showContainerOnly;
  private boolean followReferrals;
  private boolean sorted;
  private boolean showContainerOnly;
  private boolean automaticExpand;
  private boolean automaticallyExpandedNode;
  private String[] containerClasses;
@@ -302,9 +300,7 @@
    if (index >= 0) { // A node has alreay this dn -> bug
      throw new IllegalArgumentException("Duplicate suffix dn " + suffixDn);
    }
    else {
      index = - (index + 1);
    }
    SuffixNode newNode = new SuffixNode(suffixDn);
    treeModel.insertNodeInto(newNode, parentNode, index);
    startRefreshNode(newNode, null, true);
@@ -324,9 +320,7 @@
    if (index >= 0) { // A node has alreay this dn -> bug
      throw new IllegalArgumentException("Duplicate node dn " + nodeDn);
    }
    else {
      index = - (index + 1);
    }
    BasicNode newNode = new BasicNode(nodeDn);
    treeModel.insertNodeInto(newNode, parentNode, index);
    startRefreshNode(newNode, null, true);
@@ -621,10 +615,8 @@
      if (childIndex >= 0) {
        throw new IllegalArgumentException("Duplicate DN " + newEntryDn);
      }
      else {
        childIndex = - (childIndex + 1);
      }
    }
    else {
      childIndex = parentNode.getChildCount();
    }
@@ -1028,8 +1020,9 @@
      } else {
        result = "(|(&(hasSubordinates=true)"+filter+")";
      }
      for (int i = 0; i < containerClasses.length; i++) {
        result += "(objectClass=" + containerClasses[i] + ")";
      for (String containerClass : containerClasses)
      {
        result += "(objectClass=" + containerClass + ")";
      }
      result += ")";
    }
@@ -1108,7 +1101,6 @@
          Utilities.areDnsEqual(dn, ConfigConstants.DN_MONITOR_ROOT) ||
          Utilities.areDnsEqual(dn, ConfigConstants.DN_TRUST_STORE_ROOT) ||
          Utilities.areDnsEqual(dn, ConfigConstants.DN_BACKUP_ROOT) ||
          Utilities.areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN) ||
          Utilities.areDnsEqual(dn, ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT))
      {
        isConfigurationNode = true;
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java
@@ -22,8 +22,8 @@
 *
 *
 *      Copyright 2008-2011 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.guitools.controlpanel.datamodel;
import java.util.Set;
@@ -294,8 +294,7 @@
    "monitor".equalsIgnoreCase(id) ||
    "backup".equalsIgnoreCase(id) ||
    ADSContext.getDefaultBackendName().equalsIgnoreCase(id) ||
    "ads-truststore".equalsIgnoreCase(id) ||
    "replicationchanges".equalsIgnoreCase(id);
    "ads-truststore".equalsIgnoreCase(id);
  }
  /**
opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
@@ -24,7 +24,6 @@
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2014 ForgeRock AS
 */
package org.opends.guitools.controlpanel.ui;
import static org.opends.messages.AdminToolMessages.*;
@@ -60,7 +59,6 @@
import org.opends.guitools.controlpanel.task.Task;
import org.opends.guitools.controlpanel.util.Utilities;
import org.forgerock.i18n.LocalizableMessage;
import org.opends.quicksetup.Constants;
import org.opends.server.config.ConfigConstants;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
@@ -120,7 +118,7 @@
     * LDIF view (text based).
     */
    LDIF_VIEW
  };
  }
  /**
   * Default constructor.
@@ -473,7 +471,6 @@
        DN.valueOf(ConfigConstants.DN_TASK_ROOT),
        DN.valueOf(ConfigConstants.DN_MONITOR_ROOT),
        DN.valueOf(ConfigConstants.DN_BACKUP_ROOT),
        DN.valueOf(Constants.REPLICATION_CHANGES_DN),
        DN.valueOf(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT)
      };
      nonDeletable = new DN[] {
opendj3-server-dev/src/main/docbkx/admin-guide/man-list-backends.xml
@@ -111,7 +111,6 @@
monitor            : cn=monitor
myCompanyRoot      : "dc=myCompany,dc=com"
myOrgRoot          : o=myOrg
replicationChanges : dc=replicationChanges
schema             : cn=schema
tasks              : cn=tasks
userRoot           : "dc=example,dc=com"</computeroutput>
opendj3-server-dev/src/messages/messages/replication.properties
@@ -165,23 +165,16 @@
 to be the destination of a message of type %s
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=An unexpected error occurred when \
 testing existence or creating the replication backend : %s
ERR_DELETE_REPL_BACKEND_FAILED_90=An unexpected error occurred when \
 deleting the replication backend : %s
ERR_BACKEND_EXPORT_ENTRY_91=An error occurred when \
 exporting the entry %s : %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =An error occurred when \
 creating the LDIF writer to export backend : %s
ERR_BACKEND_SEARCH_ENTRY_93 =An error occurred when \
 searching for %s : %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=Entry %s does not exist in \
 the replication server backend
ERR_UNKNOWN_DN_95=The base DN %s is not stored by any of the \
 Directory Server backend
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=The replication \
 server backend does not support the import ldif function
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=The replication \
 server backend cannot export its entries in LDIF format because the \
 export-ldif command must be run as a task
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=Monitor data of remote servers \
 are missing due to a processing error : %s
ERR_SENDING_REMOTE_MONITOR_DATA_REQUEST_108=Unable to send monitor data \
@@ -189,8 +182,6 @@
 error: %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=An Exception was caught \
 while replaying replication message : %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=The replication server \
 configuration could not be found
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=The replication server is late \
regarding our changes: going to send missing ones
DEBUG_CHANGES_SENT_113=All missing changes sent to replication server
opendj3-server-dev/src/messages/messages/replication_de.properties
@@ -110,20 +110,15 @@
ERR_ERROR_CLEARING_DB_87=Beim Reinigen der Datenbank %s ist folgender Fehler aufgetreten: %s
NOTE_ERR_ROUTING_TO_SERVER_88=Protokollfehler: Ein Replikationsserver ist nicht das erwartete Ziel einer Nachricht des Typs %s
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=Beim \u00dcberpr\u00fcfen des Vorhandenseins oder bei der Erstellung des Replikations-Backends ist ein unerwarteter Fehler aufgetreten : %s
ERR_DELETE_REPL_BACKEND_FAILED_90=Beim L\u00f6schen des Replikations-Backends ist ein unerwarteter Fehler aufgetreten : %s
ERR_BACKEND_EXPORT_ENTRY_91=Beim Exportieren des Eintrags %s ist ein Fehler aufgetreten: %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =Beim Erstellen des LDIF-Schreibers zum Exportieren des Backends iste ein Fehler aufgetreten : %s
ERR_BACKEND_SEARCH_ENTRY_93 =Bei der Suche nach %s ist ein Fehler aufgetreten: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=Eintrag %s ist nicht im Replikationsserver-Backends vorhanden
ERR_UNKNOWN_DN_95=Die Basis-DN %s wird nicht einem Directory-Server-Backend gespeichert
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=Das Replikationsserver-Backend unterst\u00fctzt den Import der LDIF-Funktion nicht
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=Das Replikationsserver-Backend kann seine Eintr\u00e4ge nicht in das LDIF-Format exportieren, da der Export-LDIF-Befehl als eine Aufgabe ausgef\u00fchrt werden muss
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u00dcberwachungsdaten der Remote-Server fehlen aufgrund eines Verarbeitungsfehlers : %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=Bei der Wiedergabe der Replikationsnachricht wurde eine Ausnahme aufgefangen : %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=Die Konfiguration des Replikationsservers konnte nicht gefunden werden
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=Der Replikationsserver ist hinsichtlich unserer \u00c4nderungen versp\u00e4tet: fehlende \u00c4nderungen werden gesendet
DEBUG_CHANGES_SENT_113=Alle fehlenden \u00c4nderungen wurden an den Replikationsserver gesendet
<<<<<<< .working
ERR_PUBLISHING_FAKE_OPS_114=Aufgefangene Ausnahme ver\u00f6ffentlicht Scheinvorg\u00e4nge f\u00fcr Dom\u00e4ne %s : %s
ERR_COMPUTING_FAKE_OPS_115=Aufgefangene Ausnahme berechnet Scheinvorg\u00e4nge f\u00fcr Dom\u00e4ne %s f\u00fcr Replikationsserver %s : %s
NOTE_SERVER_STATE_RECOVERY_117=ServerState-Wiederherstellung f\u00fcr Dom\u00e4ne %s, aktualisiert mit changeNumber %s
opendj3-server-dev/src/messages/messages/replication_es.properties
@@ -110,17 +110,13 @@
ERR_ERROR_CLEARING_DB_87=Al eliminar la base de datos %s, se ha producido el siguiente error: %s
NOTE_ERR_ROUTING_TO_SERVER_88=Error de protocolo: no se espera que un servidor de r\u00e9plica sea el destino de un mensaje del tipo %s
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=Se ha producido un error inesperado al comprobar la existencia o crear el backend de repetici\u00f3n: %s
ERR_DELETE_REPL_BACKEND_FAILED_90=Se ha producido un error inesperado al eliminar el backend de repetici\u00f3n: %s
ERR_BACKEND_EXPORT_ENTRY_91=Se produjo un error al exportar la entrada %s : %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =Se ha producido un error al crear el editor de LDIF para exportar el backend: %s
ERR_BACKEND_SEARCH_ENTRY_93 =Se ha producido un error al buscar %s: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=La entrada %s no existe en el backend de servidor de repetici\u00f3n
ERR_UNKNOWN_DN_95=El ND de base %s no ha sido almacenado por ning\u00fan backend de Servidor de directorios
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=El backend de servidor de repetici\u00f3n no admite la funci\u00f3n de importaci\u00f3n de LDIF
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=El backend de servidor de repetici\u00f3n no puede exportar sus entradas en formato LDIF porque el comando export-ldif debe ejecutarse como tarea
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=Faltan los datos de supervisi\u00f3n de los servidores remotos debido a un error de procesamiento: %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=Se ha detectado una excepci\u00f3n durante la reproducci\u00f3n del mensaje de repetici\u00f3n: %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=No pudo encontrarse la configuraci\u00f3n de servidor de repetici\u00f3n
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=El servidor de repetici\u00f3n va con retraso en relaci\u00f3n con nuestros cambios: se enviar\u00e1n los que faltan
DEBUG_CHANGES_SENT_113=Se han enviado todos los cambios que faltaban al servidor de repetici\u00f3n
ERR_PUBLISHING_FAKE_OPS_114=Se ha detectado una excepci\u00f3n al publicar operaciones falsas para el dominio %s: %s
opendj3-server-dev/src/messages/messages/replication_fr.properties
@@ -110,17 +110,13 @@
ERR_ERROR_CLEARING_DB_87=L'erreur suivante s'est produite lors de l'effacement de la base de donn\u00e9es %s\u00a0: %s
NOTE_ERR_ROUTING_TO_SERVER_88=Erreur de protocole : il n'est pas pr\u00e9vu qu'un serveur de r\u00e9plication soit la destination d'un message de type %s
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=Une erreur inattendue s'est produite lors de la cr\u00e9ation ou du test de l'existence du backend de r\u00e9plication\u00a0: %s
ERR_DELETE_REPL_BACKEND_FAILED_90=Une erreur inattendue s'est produite lors de la suppression du backend de r\u00e9plication\u00a0: %s
ERR_BACKEND_EXPORT_ENTRY_91=Occurrence d'erreur lors de l'exportation de l'entr\u00e9e %s\u00a0: %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =Une erreur s'est produite lors de la cr\u00e9ation du processus d'\u00e9criture LDIF pour exporter le backend\u00a0: %s
ERR_BACKEND_SEARCH_ENTRY_93 =Une erreur s'est produite lors de la recherche de %s\u00a0: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=L'entr\u00e9e %s n'existe pas dans le backend de serveur de r\u00e9plication
ERR_UNKNOWN_DN_95=Le DN de base %s n'est stock\u00e9 par aucun backend Directory Server
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=Le backend de serveur de r\u00e9plication ne prend pas en charge la fonction d'importation LDIF
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=Le backend de serveur de r\u00e9plication ne peut pas exporter ses entr\u00e9es au format LDIF car la commande export-ldif doit \u00eatre ex\u00e9cut\u00e9e en tant que t\u00e2che
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=Les donn\u00e9es de contr\u00f4le des serveurs distants sont manquantes en raison d'une erreur de traitement\u00a0: %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=Une exception a \u00e9t\u00e9 d\u00e9tect\u00e9e lors de la r\u00e9ex\u00e9cution du message de r\u00e9plication\u00a0: %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=La configuration de serveur de r\u00e9plication est introuvable
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=Le serveur de r\u00e9plication est en retard concernant nos modifications\u00a0: il va envoyer les \u00e9l\u00e9ments manquants
DEBUG_CHANGES_SENT_113=Toutes les modifications manquantes ont \u00e9t\u00e9 envoy\u00e9es au serveur de r\u00e9plication
ERR_PUBLISHING_FAKE_OPS_114=Exception d\u00e9tect\u00e9e lors de la publication d'op\u00e9rations factices pour le domaine %s\u00a0: %s
opendj3-server-dev/src/messages/messages/replication_ja.properties
@@ -110,17 +110,13 @@
ERR_ERROR_CLEARING_DB_87=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9 %s \u306e\u6d88\u53bb\u4e2d\u306b\u6b21\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
NOTE_ERR_ROUTING_TO_SERVER_88=\u30d7\u30ed\u30c8\u30b3\u30eb\u30a8\u30e9\u30fc: \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306f\u30bf\u30a4\u30d7 %s \u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u5b9b\u5148\u3068\u3057\u3066\u671f\u5f85\u3055\u308c\u3066\u3044\u307e\u305b\u3093
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u5b58\u5728\u3092\u78ba\u8a8d\u4e2d\u3001\u307e\u305f\u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u4f5c\u6210\u4e2d\u306b\u3001\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
ERR_DELETE_REPL_BACKEND_FAILED_90=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306e\u524a\u9664\u4e2d\u306b\u3001\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
ERR_BACKEND_EXPORT_ENTRY_91=\u30a8\u30f3\u30c8\u30ea %s \u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306e LDIF \u30e9\u30a4\u30bf\u30fc\u3092\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
ERR_BACKEND_SEARCH_ENTRY_93 =%s \u306e\u691c\u7d22\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=\u30a8\u30f3\u30c8\u30ea %s \u306f\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b\u5b58\u5728\u3057\u307e\u305b\u3093
ERR_UNKNOWN_DN_95=\u30d9\u30fc\u30b9 DN %s \u306f\u3001\u3044\u305a\u308c\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b\u3082\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u305b\u3093
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067 LDIF \u30a4\u30f3\u30dd\u30fc\u30c8\u6a5f\u80fd\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3067\u30a8\u30f3\u30c8\u30ea\u3092 LDIF \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3067\u304d\u307e\u305b\u3093\u3002export-ldif \u30b3\u30de\u30f3\u30c9\u306f\u30bf\u30b9\u30af\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u51e6\u7406\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u305f\u3081\u3001\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u306e\u76e3\u8996\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093: %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u518d\u5b9f\u884c\u4e2d\u306b\u4f8b\u5916\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f: %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306e\u69cb\u6210\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u304c\u3053\u3061\u3089\u306e\u5909\u66f4\u306b\u5bfe\u3057\u3066\u9045\u308c\u3066\u3044\u307e\u3059: \u4e0d\u8db3\u5206\u3092\u9001\u4fe1\u3057\u307e\u3059
DEBUG_CHANGES_SENT_113=\u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3055\u308c\u305f\u4e0d\u8db3\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u5909\u66f4
ERR_PUBLISHING_FAKE_OPS_114=\u30c9\u30e1\u30a4\u30f3 %s \u306b\u5bfe\u3059\u308b\u7591\u4f3c\u64cd\u4f5c\u3092\u516c\u958b\u4e2d\u306b\u4f8b\u5916\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f: %s
opendj3-server-dev/src/messages/messages/replication_ko.properties
@@ -104,17 +104,13 @@
ERR_ERROR_CLEARING_DB_87=%s \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc9c0\uc6b0\ub294 \ub3d9\uc548 \ub2e4\uc74c \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
NOTE_ERR_ROUTING_TO_SERVER_88=\ud504\ub85c\ud1a0\ucf5c \uc624\ub958: \ubcf5\uc81c \uc11c\ubc84\ub294 %s \uc720\ud615 \uba54\uc2dc\uc9c0\uc758 \ub300\uc0c1\uc774 \ub420 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\ubcf5\uc81c \ubc31\uc5d4\ub4dc\ub97c \ub9cc\ub4e4\uac70\ub098 \uc788\ub294\uc9c0 \ud14c\uc2a4\ud2b8\ud558\ub294 \ub3d9\uc548 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
ERR_DELETE_REPL_BACKEND_FAILED_90=\ubcf5\uc81c \ubc31\uc5d4\ub4dc\ub97c \uc0ad\uc81c\ud558\ub294 \ub3d9\uc548 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
ERR_BACKEND_EXPORT_ENTRY_91=%s \ud56d\ubaa9\uc744 \ub0b4\ubcf4\ub0b4\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\ubc31\uc5d4\ub4dc\ub97c \ub0b4\ubcf4\ub0b4\uae30 \uc704\ud55c LDIF \uc791\uc131\uae30\ub97c \ub9cc\ub4dc\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
ERR_BACKEND_SEARCH_ENTRY_93 =%s\uc744(\ub97c) \uac80\uc0c9\ud558\ub294 \ub3d9\uc548 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=%s \ud56d\ubaa9\uc774 \ubcf5\uc81c \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0 \uc5c6\uc2b5\ub2c8\ub2e4.
ERR_UNKNOWN_DN_95=\ub514\ub809\ud1a0\ub9ac \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0\uc11c \uae30\ubcf8 DN %s\uc744(\ub97c) \uc800\uc7a5\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\ubcf5\uc81c \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0\uc11c ldif \uac00\uc838\uc624\uae30 \uae30\ub2a5\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=export-ldif \uba85\ub839\uc744 \uc791\uc5c5\uc73c\ub85c \uc2e4\ud589\ud574\uc57c \ud558\uae30 \ub54c\ubb38\uc5d0 \ubcf5\uc81c \uc11c\ubc84 \ubc31\uc5d4\ub4dc\uc5d0\uc11c \ud574\ub2f9 \ud56d\ubaa9\uc744 LDIF \ud615\uc2dd\uc73c\ub85c \ub0b4\ubcf4\ub0bc \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\ud504\ub85c\uc138\uc2f1 \uc624\ub958 \ub54c\ubb38\uc5d0 \uc6d0\uaca9 \uc11c\ubc84\uc758 \ubaa8\ub2c8\ud130 \ub370\uc774\ud130\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4: %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\ubcf5\uc81c \uba54\uc2dc\uc9c0\ub97c \uc7ac\uc0dd\ud558\ub294 \ub3d9\uc548 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\ubcf5\uc81c \uc11c\ubc84 \uad6c\uc131\uc744 \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\ubcf5\uc81c \uc11c\ubc84\uac00 \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc81c \uc2dc\uac04\uc5d0 \ucc98\ub9ac\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \ub204\ub77d\ub41c \ubcc0\uacbd \uc0ac\ud56d\uc744 \uc804\uc1a1\ud569\ub2c8\ub2e4.
DEBUG_CHANGES_SENT_113=\ub204\ub77d\ub41c \ubaa8\ub4e0 \ubcc0\uacbd \uc0ac\ud56d\uc744 \ubcf5\uc81c \uc11c\ubc84\uc5d0 \uc804\uc1a1\ud588\uc2b5\ub2c8\ub2e4.
ERR_COMPUTING_FAKE_OPS_115=\ubcf5\uc81c \uc11c\ubc84 %2$s\uc5d0 \ub300\ud574 %1$s \ub3c4\uba54\uc778\uc758 \ubaa8\uc758 \uc791\uc5c5\uc744 \uacc4\uc0b0\ud558\ub294 \ub3d9\uc548 \uc608\uc678\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %3$s
opendj3-server-dev/src/messages/messages/replication_zh_CN.properties
@@ -110,17 +110,13 @@
ERR_ERROR_CLEARING_DB_87=\u6e05\u9664\u6570\u636e\u5e93 %s \u65f6\u53d1\u751f\u5982\u4e0b\u9519\u8bef: %s
NOTE_ERR_ROUTING_TO_SERVER_88=\u534f\u8bae\u9519\u8bef\uff1a\u590d\u5236\u670d\u52a1\u5668\u4e0d\u662f\u7c7b\u578b\u4e3a %s \u7684\u6d88\u606f\u7684\u9884\u671f\u76ee\u6807
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\u6d4b\u8bd5\u5b58\u5728\u6027\u6216\u521b\u5efa\u590d\u5236\u540e\u7aef\u65f6\u51fa\u73b0\u610f\u5916\u9519\u8bef: %s
ERR_DELETE_REPL_BACKEND_FAILED_90=\u5220\u9664\u590d\u5236\u540e\u7aef\u65f6\u51fa\u73b0\u610f\u5916\u9519\u8bef: %s
ERR_BACKEND_EXPORT_ENTRY_91=\u5728\u5bfc\u51fa\u6761\u76ee %s \u65f6\u51fa\u73b0\u9519\u8bef: %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\u521b\u5efa LDIF \u7f16\u5199\u5668\u4ee5\u5bfc\u51fa\u540e\u7aef\u65f6\u51fa\u73b0\u9519\u8bef: %s
ERR_BACKEND_SEARCH_ENTRY_93 =\u641c\u7d22 %s \u65f6\u51fa\u73b0\u9519\u8bef: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=\u590d\u5236\u670d\u52a1\u5668\u540e\u7aef\u4e2d\u4e0d\u5b58\u5728\u6761\u76ee %s
ERR_UNKNOWN_DN_95=\u6240\u6709\u76ee\u5f55\u670d\u52a1\u5668\u540e\u7aef\u90fd\u672a\u5b58\u50a8\u57fa DN %s
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\u590d\u5236\u670d\u52a1\u5668\u540e\u7aef\u4e0d\u652f\u6301\u5bfc\u5165 ldif \u529f\u80fd
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=\u590d\u5236\u670d\u52a1\u5668\u540e\u7aef\u4e0d\u80fd\u4ee5 LDIF \u683c\u5f0f\u5bfc\u51fa\u5176\u6761\u76ee\uff0c\u56e0\u4e3a export-ldif \u547d\u4ee4\u5fc5\u987b\u4f5c\u4e3a\u4efb\u52a1\u8fd0\u884c
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u7531\u4e8e\u5904\u7406\u9519\u8bef %s\uff0c\u56e0\u6b64\u4e22\u5931\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76d1\u89c6\u6570\u636e
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\u5728\u91cd\u653e\u590d\u5236\u6d88\u606f\u65f6\u6355\u83b7\u5230\u5f02\u5e38: %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\u627e\u4e0d\u5230\u590d\u5236\u670d\u52a1\u5668\u914d\u7f6e
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\u590d\u5236\u670d\u52a1\u5668\u672a\u53ca\u65f6\u53cd\u6620\u6211\u4eec\u7684\u66f4\u6539\uff1a\u5c06\u53d1\u9001\u4e22\u5931\u7684\u9879
DEBUG_CHANGES_SENT_113=\u6240\u6709\u4e22\u5931\u7684\u66f4\u6539\u90fd\u5df2\u53d1\u9001\u5230\u590d\u5236\u670d\u52a1\u5668
ERR_PUBLISHING_FAKE_OPS_114=\u53d1\u5e03\u57df %s \u7684\u865a\u5047\u64cd\u4f5c\u65f6\u6355\u83b7\u5230\u5f02\u5e38: %s
opendj3-server-dev/src/messages/messages/replication_zh_TW.properties
@@ -104,17 +104,13 @@
ERR_ERROR_CLEARING_DB_87=\u6e05\u9664\u8cc7\u6599\u5eab %s \u6642\u767c\u751f\u4e0b\u5217\u932f\u8aa4: %s
NOTE_ERR_ROUTING_TO_SERVER_88=\u5354\u5b9a\u932f\u8aa4: \u8907\u88fd\u4f3a\u670d\u5668\u4e0d\u61c9\u70ba\u8a0a\u606f\u985e\u578b %s \u7684\u76ee\u6a19
ERR_CHECK_CREATE_REPL_BACKEND_FAILED_89=\u6e2c\u8a66\u5b58\u5728\u6027\u6216\u5efa\u7acb\u8907\u88fd\u5f8c\u7aef\u6642\uff0c\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4: %s
ERR_DELETE_REPL_BACKEND_FAILED_90=\u522a\u9664\u8907\u88fd\u5f8c\u7aef\u6642\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4: %s
ERR_BACKEND_EXPORT_ENTRY_91=\u532f\u51fa\u9805\u76ee %s \u6642\u767c\u751f\u932f\u8aa4: %s
ERR_BACKEND_CANNOT_CREATE_LDIF_WRITER_92 =\u5efa\u7acb LDIF \u7de8\u5beb\u5668\u4ee5\u532f\u51fa\u5f8c\u7aef\u6642\u767c\u751f\u932f\u8aa4: %s
ERR_BACKEND_SEARCH_ENTRY_93 =\u641c\u5c0b %s \u6642\u767c\u751f\u932f\u8aa4: %s
ERR_REPLICATIONBACKEND_ENTRY_DOESNT_EXIST_94=\u9805\u76ee %s \u4e0d\u5b58\u5728\u65bc\u8907\u88fd\u4f3a\u670d\u5668\u5f8c\u7aef\u4e2d
ERR_UNKNOWN_DN_95=\u57fa\u5e95 DN %s \u4e26\u672a\u7531\u4efb\u4f55\u76ee\u9304\u4f3a\u670d\u5668\u5f8c\u7aef\u5132\u5b58
ERR_REPLICATONBACKEND_IMPORT_LDIF_NOT_SUPPORTED_98=\u8907\u88fd\u4f3a\u670d\u5668\u5f8c\u7aef\u4e0d\u652f\u63f4\u532f\u5165 LDIF \u529f\u80fd
ERR_REPLICATONBACKEND_EXPORT_LDIF_FAILED_99=\u8907\u88fd\u4f3a\u670d\u5668\u5f8c\u7aef\u7121\u6cd5\u4ee5 LDIF \u683c\u5f0f\u532f\u51fa\u5176\u9805\u76ee\uff0c\u56e0\u70ba export-ldif \u6307\u4ee4\u5fc5\u9808\u4ee5\u4f5c\u696d\u7684\u5f62\u5f0f\u57f7\u884c
ERR_PROCESSING_REMOTE_MONITOR_DATA_107=\u9060\u7aef\u4f3a\u670d\u5668\u7684\u76e3\u8996\u8cc7\u6599\u56e0\u8655\u7406\u932f\u8aa4\u800c\u907a\u5931: %s
ERR_EXCEPTION_REPLAYING_REPLICATION_MESSAGE_109=\u91cd\u65b0\u57f7\u884c\u8907\u88fd\u8a0a\u606f\u6642\u767c\u751f\u7570\u5e38: %s
ERR_REPLICATION_SERVER_CONFIG_NOT_FOUND_110=\u627e\u4e0d\u5230\u8907\u88fd\u4f3a\u670d\u5668\u914d\u7f6e
DEBUG_GOING_TO_SEARCH_FOR_CHANGES_111=\u8907\u88fd\u4f3a\u670d\u5668\u4f86\u4e0d\u53ca\u8655\u7406\u6211\u5011\u7684\u66f4\u65b0: \u5c07\u50b3\u9001\u907a\u6f0f\u7684\u90e8\u5206
DEBUG_CHANGES_SENT_113=\u6240\u6709\u50b3\u9001\u81f3\u8907\u88fd\u4f3a\u670d\u5668\u7684\u907a\u6f0f\u8b8a\u66f4
ERR_COMPUTING_FAKE_OPS_115=\u70ba\u8907\u88fd\u4f3a\u670d\u5668 %2$s \u8a08\u7b97\u7db2\u57df %1$s \u7684\u5047\u4f5c\u696d\u6642\u767c\u751f\u7570\u5e38: %3$s
opendj3-server-dev/src/quicksetup/org/opends/quicksetup/Constants.java
@@ -22,9 +22,8 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2013 ForgeRock AS
 *      Portions Copyright 2011-2014 ForgeRock AS
 */
package org.opends.quicksetup;
import org.opends.admin.ads.ADSContext;
@@ -67,9 +66,6 @@
  /** DN of the schema object. */
  public static final String SCHEMA_DN = "cn=schema";
  /** DN of the replication changes base DN. */
  public static final String REPLICATION_CHANGES_DN = "dc=replicationChanges";
  /** The cli java system property. */
  public static final String CLI_JAVA_PROPERTY = "org.opends.quicksetup.cli";
opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/ui/SuffixesToReplicatePanel.java
@@ -24,7 +24,6 @@
 *      Copyright 2008-2010 Sun Microsystems, Inc.
 *      Portions Copyright 2013-2014 ForgeRock AS.
 */
package org.opends.quicksetup.installer.ui;
import java.awt.Component;
@@ -237,9 +236,7 @@
      {
        if (!Utils.areDnsEqual(suffix.getDN(),
            ADSContext.getAdministrationSuffixDN()) &&
            !Utils.areDnsEqual(suffix.getDN(), Constants.SCHEMA_DN) &&
            !Utils.areDnsEqual(suffix.getDN(),
                Constants.REPLICATION_CHANGES_DN))
            !Utils.areDnsEqual(suffix.getDN(), Constants.SCHEMA_DN))
        {
          orderedSuffixes.add(suffix);
        }
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationBackend.java
File was deleted
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -27,7 +27,6 @@
package org.opends.server.replication.server;
import java.io.IOException;
import java.io.StringReader;
import java.net.*;
import java.util.*;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -42,7 +41,7 @@
import org.opends.server.admin.std.meta.VirtualAttributeCfgDefn.ConflictBehavior;
import org.opends.server.admin.std.server.ReplicationServerCfg;
import org.opends.server.admin.std.server.UserDefinedVirtualAttributeCfg;
import org.opends.server.api.*;
import org.opends.server.api.VirtualAttributeProvider;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.WorkflowImpl;
import org.opends.server.core.networkgroups.NetworkGroup;
@@ -55,12 +54,10 @@
import org.opends.server.replication.server.changelog.api.ChangelogException;
import org.opends.server.replication.server.changelog.je.JEChangelogDB;
import org.opends.server.types.*;
import org.opends.server.util.LDIFReader;
import org.opends.server.util.ServerConstants;
import org.opends.server.workflowelement.externalchangelog.ECLWorkflowElement;
import static org.opends.messages.ReplicationMessages.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
@@ -71,9 +68,7 @@
 * replicationServerDomain and managing it
 */
public final class ReplicationServer
  implements ConfigurationChangeListener<ReplicationServerCfg>,
             BackupTaskListener, RestoreTaskListener, ImportTaskListener,
             ExportTaskListener
  implements ConfigurationChangeListener<ReplicationServerCfg>
{
  private String serverURL;
@@ -96,13 +91,6 @@
  private boolean stopListen = false;
  private ReplSessionSecurity replSessionSecurity;
  /**
   * For the backend associated to this replication server, DN of the config
   * entry of the backend.
   */
  private DN backendConfigEntryDN;
  /** ID of the backend. */
  private static final String backendId = "replicationChanges";
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  private static String eclWorkflowID =
@@ -144,20 +132,6 @@
    replSessionSecurity = new ReplSessionSecurity();
    initialize();
    configuration.addChangeListener(this);
    try
    {
      backendConfigEntryDN = DN.valueOf("ds-cfg-backend-id=" +
          backendId + ",cn=Backends,cn=config");
    } catch (DirectoryException e) { /* do nothing */ }
    // Creates the backend associated to this ReplicationServer
    // if it does not exist.
    createBackend();
    DirectoryServer.registerBackupTaskListener(this);
    DirectoryServer.registerRestoreTaskListener(this);
    DirectoryServer.registerExportTaskListener(this);
    DirectoryServer.registerImportTaskListener(this);
    localPorts.add(getReplicationPort());
@@ -919,52 +893,6 @@
  }
  /**
   * Creates the backend associated to this replication server.
   */
  private void createBackend() throws ConfigException
  {
    try
    {
      String ldif = makeLdif(
          "dn: ds-cfg-backend-id="+backendId+",cn=Backends,cn=config",
          "objectClass: top",
          "objectClass: ds-cfg-backend",
          "ds-cfg-base-dn: dc="+backendId,
          "ds-cfg-enabled: true",
          "ds-cfg-writability-mode: enabled",
          "ds-cfg-java-class: " +
            "org.opends.server.replication.server.ReplicationBackend",
          "ds-cfg-backend-id: " + backendId);
      LDIFImportConfig ldifImportConfig = new LDIFImportConfig(
          new StringReader(ldif));
      LDIFReader reader = new LDIFReader(ldifImportConfig);
      Entry backendConfigEntry = reader.readEntry();
      if (!DirectoryServer.getConfigHandler().entryExists(backendConfigEntryDN))
      {
        // Add the replication backend
        DirectoryServer.getConfigHandler().addEntry(backendConfigEntry, null);
      }
      ldifImportConfig.close();
    }
    catch(Exception e)
    {
      throw new ConfigException(ERR_CHECK_CREATE_REPL_BACKEND_FAILED.get(e.getLocalizedMessage()), e);
    }
  }
  private static String makeLdif(String... lines)
  {
    StringBuilder buffer = new StringBuilder();
    for (String line : lines) {
      buffer.append(line).append(EOL);
    }
    // Append an extra line so we can append LDIF Strings.
    buffer.append(EOL);
    return buffer.toString();
  }
  /**
   * Do what needed when the config object related to this replication server
   * is deleted from the server configuration.
   */
@@ -974,119 +902,6 @@
      logger.trace("RS " + getMonitorInstanceName() + " starts removing");
    shutdown();
    removeBackend();
    DirectoryServer.deregisterBackupTaskListener(this);
    DirectoryServer.deregisterRestoreTaskListener(this);
    DirectoryServer.deregisterExportTaskListener(this);
    DirectoryServer.deregisterImportTaskListener(this);
  }
  /**
   * Removes the backend associated to this Replication Server that has been
   * created when this replication server was created.
   */
  protected void removeBackend()
  {
    try
    {
      if (DirectoryServer.getConfigHandler().entryExists(backendConfigEntryDN))
      {
        // Delete the replication backend
        DirectoryServer.getConfigHandler().deleteEntry(backendConfigEntryDN,
            null);
      }
    }
    catch(Exception e)
    {
      logger.error(ERR_DELETE_REPL_BACKEND_FAILED, e.getLocalizedMessage());
    }
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processBackupBegin(Backend backend, BackupConfig config)
  {
    // Nothing is needed at the moment
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processBackupEnd(Backend backend, BackupConfig config,
                               boolean successful)
  {
    // Nothing is needed at the moment
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processRestoreBegin(Backend backend, RestoreConfig config)
  {
    if (backend.getBackendID().equals(backendId))
      shutdown();
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processRestoreEnd(Backend backend, RestoreConfig config,
                                boolean successful)
  {
    if (backend.getBackendID().equals(backendId))
      initialize();
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processImportBegin(Backend backend, LDIFImportConfig config)
  {
    // Nothing is needed at the moment
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processImportEnd(Backend backend, LDIFImportConfig config,
                               boolean successful)
  {
    // Nothing is needed at the moment
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processExportBegin(Backend backend, LDIFExportConfig config)
  {
    if (logger.isTraceEnabled())
      logger.trace("RS " + getMonitorInstanceName() + " Export starts");
    if (backend.getBackendID().equals(backendId))
    {
      // Retrieves the backend related to this replicationServerDomain
      ReplicationBackend b =
      (ReplicationBackend)DirectoryServer.getBackend(backendId);
      b.setServer(this);
    }
  }
  /**
   * {@inheritDoc}
   */
  @Override
  public void processExportEnd(Backend backend, LDIFExportConfig config,
                               boolean successful)
  {
    // Nothing is needed at the moment
  }
  /**
opendj3-server-dev/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -1344,29 +1344,6 @@
   * {@link DBCursor#close()} method to free the resources and locks used by the
   * cursor.
   *
   * @param startAfterCSN
   *          Starting point for the cursor. If null, start from the oldest CSN
   * @return a non null {@link DBCursor}
   * @throws ChangelogException
   *           If a database problem happened
   * @see ReplicationDomainDB#getCursorFrom(DN, CSN)
   */
  public DBCursor<UpdateMsg> getCursorFrom(CSN startAfterCSN)
      throws ChangelogException
  {
    return domainDB.getCursorFrom(baseDN, startAfterCSN);
  }
  /**
   * Creates and returns a cursor across this replication domain.
   * <p>
   * Client code must call {@link DBCursor#next()} to advance the cursor to the
   * next available record.
   * <p>
   * When the cursor is not used anymore, client code MUST call the
   * {@link DBCursor#close()} method to free the resources and locks used by the
   * cursor.
   *
   * @param startAfterServerState
   *          Starting point for the replicaDB cursors. If null, start from the
   *          oldest CSN
@@ -1382,16 +1359,6 @@
  }
  /**
   * Returns the change count for that ReplicationServerDomain.
   *
   * @return the change count.
   */
  public long getChangesCount()
  {
    return domainDB.getDomainChangesCount(baseDN);
  }
  /**
   * Get the baseDN.
   *
   * @return Returns the baseDN.
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
@@ -38,15 +38,6 @@
{
  /**
   * Get the number of changes for the specified replication domain.
   *
   * @param baseDN
   *          the replication domain baseDN
   * @return the number of changes.
   */
  long getDomainChangesCount(DN baseDN);
  /**
   * Returns the oldest {@link CSN}s from the replicaDBs for each serverId in
   * the specified replication domain.
   *
@@ -102,29 +93,6 @@
  /**
   * Generates a {@link DBCursor} across all the replicaDBs for the specified
   * replication domain, with all cursors starting after the provided CSN.
   * <p>
   * The cursor is already advanced to the record after startAfterCSN.
   * <p>
   * When the cursor is not used anymore, client code MUST call the
   * {@link DBCursor#close()} method to free the resources and locks used by the
   * cursor.
   *
   * @param baseDN
   *          the replication domain baseDN
   * @param startAfterCSN
   *          Starting point for each ReplicaDB cursor. If null, start from the
   *          oldest CSN for each ReplicaDB cursor.
   * @return a non null {@link DBCursor}
   * @throws ChangelogException
   *           If a database problem happened
   * @see #getCursorFrom(DN, ServerState)
   */
  DBCursor<UpdateMsg> getCursorFrom(DN baseDN, CSN startAfterCSN)
      throws ChangelogException;
  /**
   * Generates a {@link DBCursor} across all the replicaDBs for the specified
   * replication domain starting after the provided {@link ServerState} for each
   * replicaDBs.
   * <p>
@@ -143,7 +111,6 @@
   * @return a non null {@link DBCursor}
   * @throws ChangelogException
   *           If a database problem happened
   * @see #getCursorFrom(DN, CSN)
   */
  DBCursor<UpdateMsg> getCursorFrom(DN baseDN,
      ServerState startAfterServerState) throws ChangelogException;
@@ -168,7 +135,6 @@
   * @return a non null {@link DBCursor}
   * @throws ChangelogException
   *           If a database problem happened
   * @see #getCursorFrom(DN, CSN)
   */
  DBCursor<UpdateMsg> getCursorFrom(DN baseDN, int serverId, CSN startAfterCSN)
      throws ChangelogException;
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
@@ -511,19 +511,6 @@
    StaticUtils.recursiveDelete(dbDirectory);
  }
  /** {@inheritDoc} */
  @Override
  public long getDomainChangesCount(DN baseDN)
  {
    long entryCount = 0;
    for (JEReplicaDB replicaDB : getDomainMap(baseDN).values())
    {
      entryCount += replicaDB.getChangesCount();
    }
    return entryCount;
  }
  /** {@inheritDoc} */
  @Override
  public ServerState getDomainOldestCSNs(DN baseDN)
@@ -713,16 +700,6 @@
  /** {@inheritDoc} */
  @Override
  public DBCursor<UpdateMsg> getCursorFrom(DN baseDN, CSN startAfterCSN)
      throws ChangelogException
  {
    // Builds a new serverState for all the serverIds in the replication domain
    // to ensure we get cursors starting after the provided CSN.
    return getCursorFrom(baseDN, buildServerState(baseDN, startAfterCSN));
  }
  /** {@inheritDoc} */
  @Override
  public DBCursor<UpdateMsg> getCursorFrom(DN baseDN,
      ServerState startAfterServerState) throws ChangelogException
  {
@@ -756,32 +733,6 @@
    return EMPTY_CURSOR;
  }
  private ServerState buildServerState(DN baseDN, CSN startAfterCSN)
  {
    final ServerState result = new ServerState();
    if (startAfterCSN == null)
    {
      return result;
    }
    for (int serverId : getDomainMap(baseDN).keySet())
    {
      if (serverId == startAfterCSN.getServerId())
      {
        // reuse the provided CSN one as it is the most accurate
        result.update(startAfterCSN);
      }
      else
      {
        // build a new CSN, ignoring the seqNum since it is irrelevant for
        // a different serverId
        final CSN csn = startAfterCSN; // only used for increased readability
        result.update(new CSN(csn.getTime(), 0, serverId));
      }
    }
    return result;
  }
  /** {@inheritDoc} */
  @Override
  public boolean publishUpdateMsg(DN baseDN, UpdateMsg updateMsg)
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEReplicaDB.java
@@ -174,21 +174,6 @@
  }
  /**
   * Get the number of changes.
   *
   * @return Returns the number of changes.
   */
  public long getChangesCount()
  {
    final CSNLimits limits = csnLimits;
    if (limits.newestCSN != null && limits.oldestCSN != null)
    {
      return limits.newestCSN.getSeqnum() - limits.oldestCSN.getSeqnum() + 1;
    }
    return 0;
  }
  /**
   * Generate a new {@link DBCursor} that allows to browse the db managed by
   * this ReplicaDB and starting at the position defined by a given CSN.
   *
opendj3-server-dev/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -25,10 +25,8 @@
 *      Portions Copyright 2011-2014 ForgeRock AS
 *      Portions Copyright 2012 profiq s.r.o.
 */
package org.opends.server.tools.dsreplication;
import org.opends.admin.ads.*;
import org.opends.admin.ads.ADSContext.ADSPropertySyntax;
import org.opends.admin.ads.ADSContext.AdministratorProperty;
@@ -43,6 +41,8 @@
import org.opends.guitools.controlpanel.util.*;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
import org.forgerock.i18n.LocalizableMessageDescriptor.Arg0;
import org.forgerock.i18n.LocalizableMessageDescriptor.Arg1;
import org.opends.quicksetup.ApplicationException;
import org.opends.quicksetup.Constants;
import org.opends.quicksetup.Installation;
@@ -144,7 +144,7 @@
import static org.opends.quicksetup.util.Utils.getFirstValue;
import static org.opends.quicksetup.util.Utils.getThrowableMsg;
import static org.opends.server.tools.dsreplication.ReplicationCliReturnCode.*;
import static org.opends.server.util.StaticUtils.close;
import static org.opends.server.util.StaticUtils.*;
/**
 * This class provides a tool that can be used to enable and disable replication
@@ -1813,56 +1813,35 @@
      }
      if (interactive)
      {
        askConfirmations(suffixes, availableSuffixes,
            ERR_NO_SUFFIXES_AVAILABLE_TO_PURGE_HISTORICAL,
            ERR_NO_SUFFIXES_SELECTED_TO_PURGE_HISTORICAL,
            INFO_REPLICATION_PURGE_HISTORICAL_PROMPT);
      }
    }
  }
  private void askConfirmations(Collection<String> suffixes,
      Collection<String> availableSuffixes, Arg0 noSuffixAvailableMsg,
      Arg0 noSuffixSelectedMsg, Arg1<Object> confirmationMsgPromt)
  {
        boolean confirmationLimitReached = false;
        while (suffixes.isEmpty())
        {
          boolean noSchemaOrAds = false;
          for (String s: availableSuffixes)
          {
            if (!areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
                !areDnsEqual(s, Constants.SCHEMA_DN) &&
                !areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
            {
              noSchemaOrAds = true;
            }
          }
          if (!noSchemaOrAds)
      if (!noSchemaOrAds(availableSuffixes))
          {
            // In interactive mode we do not propose to manage the
            // administration suffix.
            println();
            println(ERR_NO_SUFFIXES_AVAILABLE_TO_PURGE_HISTORICAL.get());
        println(noSuffixAvailableMsg.get());
            break;
          }
          else
          {
            println();
            println(ERR_NO_SUFFIXES_SELECTED_TO_PURGE_HISTORICAL.get());
            for (String dn : availableSuffixes)
            {
              if (!areDnsEqual(dn,
                  ADSContext.getAdministrationSuffixDN()) &&
                  !areDnsEqual(dn, Constants.SCHEMA_DN) &&
                  !areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
              {
                try
                {
                  if (askConfirmation(
                      INFO_REPLICATION_PURGE_HISTORICAL_PROMPT.get(dn), true,
                      logger))
                  {
                    suffixes.add(dn);
                  }
                }
                catch (ClientException ce)
                {
                  println(ce.getMessageObject());
                  confirmationLimitReached = true;
                  break;
                }
              }
            }
          }
      println(noSuffixSelectedMsg.get());
      confirmationLimitReached =
          askConfirmations(confirmationMsgPromt, availableSuffixes, suffixes,
              confirmationLimitReached);
          if (confirmationLimitReached)
          {
            suffixes.clear();
@@ -1870,8 +1849,24 @@
          }
        }
      }
  private boolean noSchemaOrAds(Collection<String> suffixes)
  {
    for (String suffix : suffixes)
    {
      if (isNotSchemaOrAds(suffix))
      {
        return true;
    }
  }
    return false;
  }
  private boolean isNotSchemaOrAds(String suffix)
  {
    return !areDnsEqual(suffix, ADSContext.getAdministrationSuffixDN())
        && !areDnsEqual(suffix, Constants.SCHEMA_DN);
  }
  /**
   * Based on the data provided in the command-line it initializes replication
@@ -1902,7 +1897,6 @@
    return returnValue;
  }
  /**
   * Updates the contents of the provided PurgeHistoricalUserData
   * object with the information provided in the command-line.  If some
@@ -5346,62 +5340,10 @@
      }
      if (interactive)
      {
        boolean confirmationLimitReached = false;
        while (suffixes.isEmpty())
        {
          boolean noSchemaOrAds = false;
          for (String s: availableSuffixes)
          {
            if (!areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
                !areDnsEqual(s, Constants.SCHEMA_DN) &&
                !areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
            {
              noSchemaOrAds = true;
            }
          }
          if (!noSchemaOrAds)
          {
            // In interactive mode we do not propose to manage the
            // administration suffix.
            println();
            println(
                ERR_NO_SUFFIXES_AVAILABLE_TO_ENABLE_REPLICATION.get());
            break;
          }
          else
          {
            println();
            println(ERR_NO_SUFFIXES_SELECTED_TO_REPLICATE.get());
            for (String dn : availableSuffixes)
            {
              if (!areDnsEqual(dn,
                  ADSContext.getAdministrationSuffixDN()) &&
                  !areDnsEqual(dn, Constants.SCHEMA_DN) &&
                  !areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
              {
                try
                {
                  if (askConfirmation(
                    INFO_REPLICATION_ENABLE_SUFFIX_PROMPT.get(dn), true, logger))
                  {
                    suffixes.add(dn);
                  }
                }
                catch (ClientException ce)
                {
                  println(ce.getMessageObject());
                  confirmationLimitReached = true;
                  break;
                }
              }
            }
          }
          if (confirmationLimitReached)
          {
            suffixes.clear();
            break;
          }
        }
        askConfirmations(suffixes, availableSuffixes,
            ERR_NO_SUFFIXES_AVAILABLE_TO_ENABLE_REPLICATION,
            ERR_NO_SUFFIXES_SELECTED_TO_REPLICATE,
            INFO_REPLICATION_ENABLE_SUFFIX_PROMPT);
      }
    }
  }
@@ -5524,17 +5466,7 @@
        boolean confirmationLimitReached = false;
        while (suffixes.isEmpty())
        {
          boolean noSchemaOrAds = false;
          for (String s: availableSuffixes)
          {
            if (!areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
                !areDnsEqual(s, Constants.SCHEMA_DN) &&
                !areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
            {
              noSchemaOrAds = true;
            }
          }
          if (!noSchemaOrAds)
          if (!noSchemaOrAds(availableSuffixes))
          {
            // In interactive mode we do not propose to manage the
            // administration suffix.
@@ -5552,30 +5484,9 @@
              println();
              println(ERR_NO_SUFFIXES_SELECTED_TO_DISABLE.get());
            }
            for (String dn : availableSuffixes)
            {
              if (!areDnsEqual(dn,
                  ADSContext.getAdministrationSuffixDN()) &&
                  !areDnsEqual(dn, Constants.SCHEMA_DN) &&
                  !areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
              {
                try
                {
                  if (askConfirmation(
                      INFO_REPLICATION_DISABLE_SUFFIX_PROMPT.get(dn), true,
                      logger))
                  {
                    suffixes.add(dn);
                  }
                }
                catch (ClientException ce)
                {
                  println(ce.getMessageObject());
                  confirmationLimitReached = true;
                  break;
                }
              }
            }
            confirmationLimitReached =
                askConfirmations(INFO_REPLICATION_DISABLE_SUFFIX_PROMPT,
                    availableSuffixes, suffixes, confirmationLimitReached);
          }
          if (confirmationLimitReached)
          {
@@ -5591,6 +5502,32 @@
    }
  }
  private boolean askConfirmations(Arg1<Object> confirmationMsg,
      Collection<String> availableSuffixes, Collection<String> suffixes,
      boolean confirmationLimitReached)
  {
    for (String dn : availableSuffixes)
    {
      if (isNotSchemaOrAds(dn))
      {
        try
        {
          if (askConfirmation(confirmationMsg.get(dn), true, logger))
          {
            suffixes.add(dn);
          }
        }
        catch (ClientException ce)
        {
          println(ce.getMessageObject());
          confirmationLimitReached = true;
          break;
        }
      }
    }
    return confirmationLimitReached;
  }
  /**
   * Checks that replication can actually be initialized in the provided baseDNs
   * for the server.
@@ -5709,17 +5646,7 @@
        boolean confirmationLimitReached = false;
        while (suffixes.isEmpty())
        {
          boolean noSchemaOrAds = false;
          for (String s: availableSuffixes)
          {
            if (!areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
                !areDnsEqual(s, Constants.SCHEMA_DN) &&
                !areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
            {
              noSchemaOrAds = true;
            }
          }
          if (!noSchemaOrAds)
          if (!noSchemaOrAds(availableSuffixes))
          {
            // In interactive mode we do not propose to manage the
            // administration suffix.
@@ -5755,10 +5682,7 @@
            }
            for (String dn : availableSuffixes)
            {
              if (!areDnsEqual(dn,
                  ADSContext.getAdministrationSuffixDN()) &&
                  !areDnsEqual(dn, Constants.SCHEMA_DN) &&
                  !areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
              if (isNotSchemaOrAds(dn))
              {
                boolean addSuffix;
                try
@@ -5858,63 +5782,10 @@
      }
      if (interactive)
      {
        boolean confirmationLimitReached = false;
        while (suffixes.isEmpty())
        {
          boolean noSchemaOrAds = false;
          for (String s: availableSuffixes)
          {
            if (!areDnsEqual(s, ADSContext.getAdministrationSuffixDN()) &&
                !areDnsEqual(s, Constants.SCHEMA_DN) &&
                !areDnsEqual(s, Constants.REPLICATION_CHANGES_DN))
            {
              noSchemaOrAds = true;
            }
          }
          if (!noSchemaOrAds)
          {
            // In interactive mode we do not propose to manage the
            // administration suffix.
            println();
            println(ERR_NO_SUFFIXES_AVAILABLE_TO_INITIALIZE_REPLICATION.get());
            break;
          }
          else
          {
            println();
            println(ERR_NO_SUFFIXES_SELECTED_TO_INITIALIZE.get());
            for (String dn : availableSuffixes)
            {
              if (!areDnsEqual(dn,
                  ADSContext.getAdministrationSuffixDN()) &&
                  !areDnsEqual(dn, Constants.SCHEMA_DN) &&
                  !areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN))
              {
                try
                {
                  if (askConfirmation(
                      INFO_REPLICATION_INITIALIZE_SUFFIX_PROMPT.get(dn), true,
                      logger))
                  {
                    suffixes.add(dn);
                  }
                }
                catch (ClientException ce)
                {
                  println(ce.getMessageObject());
                  confirmationLimitReached = true;
                  break;
                }
              }
            }
          }
          if (confirmationLimitReached)
          {
            suffixes.clear();
            break;
          }
        }
        askConfirmations(suffixes, availableSuffixes,
            ERR_NO_SUFFIXES_AVAILABLE_TO_INITIALIZE_REPLICATION,
            ERR_NO_SUFFIXES_SELECTED_TO_INITIALIZE,
            INFO_REPLICATION_INITIALIZE_SUFFIX_PROMPT);
      }
    }
  }
@@ -7277,8 +7148,7 @@
      // and cn=admin data.
      boolean found = displayAll &&
      !areDnsEqual(dn, ADSContext.getAdministrationSuffixDN()) &&
      !areDnsEqual(dn, Constants.SCHEMA_DN) &&
      !areDnsEqual(dn, Constants.REPLICATION_CHANGES_DN);
      !areDnsEqual(dn, Constants.SCHEMA_DN);
      for (String baseDN : userBaseDNs)
      {
        found = areDnsEqual(baseDN, dn);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java
@@ -34,18 +34,15 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.SearchScope;
import org.opends.server.TestCaseUtils;
import org.opends.server.backends.MemoryBackend;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.replication.common.CSNGenerator;
import org.opends.server.replication.common.ServerStatus;
import org.opends.server.replication.plugin.LDAPReplicationDomain;
import org.opends.server.replication.plugin.MultimasterReplication;
import org.opends.server.replication.protocol.*;
import org.opends.server.replication.server.ReplServerFakeConfiguration;
import org.opends.server.replication.server.ReplicationBackend;
import org.opends.server.replication.server.ReplicationServer;
import org.opends.server.replication.server.ReplicationServerDomain;
import org.opends.server.replication.service.ReplicationBroker;
@@ -557,18 +554,7 @@
   */
  private void checkChangelogSize(int expectedCount) throws Exception
  {
    int count = 0;
    InternalSearchOperation op;
    do
    {
      Thread.sleep(10);
      op = connection.processSearch(
          "dc=replicationchanges", SearchScope.SUBORDINATES, "(objectclass=*)");
    }
    while (count < 300 // wait 3s maximum
        && op.getResultCode() != ResultCode.SUCCESS
        && op.getSearchEntries().size() != expectedCount);
    Assertions.assertThat(op.getSearchEntries()).hasSize(expectedCount);
    throw new RuntimeException("Dead code. Should we remove this method and the test calling it?");
  }
  /**
@@ -595,21 +581,20 @@
      // To search the replication server db later in these tests, we need
      // to attach the search backend to the replication server just created.
      ReplicationBackend b =
        (ReplicationBackend)DirectoryServer.getBackend("replicationChanges");
      b.setServer(replServer1);
      //===========================================================
      debugInfo(testCase + " ** TEST ** Empty backend");
      connectServer1ToReplServer(replServer1);
      debugInfo(testCase + " Expect genId to be not retrievable from suffix root entry");
      debugInfo(testCase
          + " Expect genId to be not retrievable from suffix root entry");
      dsGenId = readGenIdFromSuffixRootEntry();
      assertEquals(dsGenId,-1);
      debugInfo(testCase + " Expect genId to be set in memory on the replication " +
      " server side (not wrote on disk/db since no change occurred).");
      debugInfo(testCase
          + " Expect genId to be set in memory on the replication "
          + " server side (not wrote on disk/db since no change occurred).");
      rsGenId = replServer1.getGenerationId(baseDN);
      assertEquals(rsGenId, EMPTY_DN_GENID);
@@ -625,7 +610,8 @@
      connectServer1ToReplServer(replServer1);
      debugInfo(testCase + " Test that the generationId is written in the DB in the root entry on DS1");
      debugInfo(testCase
          + " Test that the generationId is written in the DB in the root entry on DS1");
      dsGenId = readGenIdFromSuffixRootEntry();
      assertTrue(dsGenId != -1);
      assertTrue(dsGenId != EMPTY_DN_GENID);
@@ -637,23 +623,29 @@
      //===========================================================
      debugInfo(testCase + " ** TEST ** DS2 connection to RS1 with bad genID");
      broker2 = openReplicationSession(baseDN, server2ID, 100,
          replServer1.getReplicationPort(), 1000, dsGenId+1);
      broker2 =
          openReplicationSession(baseDN, server2ID, 100, replServer1
              .getReplicationPort(), 1000, dsGenId + 1);
      //===========================================================
      debugInfo(testCase + " ** TEST ** DS3 connection to RS1 with good genID");
      broker3 = openReplicationSession(baseDN, server3ID, 100,
          replServer1.getReplicationPort(), 1000, dsGenId);
      broker3 =
          openReplicationSession(baseDN, server3ID, 100, replServer1
              .getReplicationPort(), 1000, dsGenId);
      //===========================================================
      debugInfo(testCase + " ** TEST ** DS2 (bad genID) changes must be ignored.");
      debugInfo(testCase
          + " ** TEST ** DS2 (bad genID) changes must be ignored.");
      broker2.publish(createAddMsg());
      assertNoMessageReceived(broker3, "broker3",
      assertNoMessageReceived(
          broker3,
          "broker3",
          "Note that timeout should be lower than RS monitoring publisher period so that timeout occurs");
      //===========================================================
      debugInfo(testCase + " ** TEST ** The part of the topology with the right gen ID should work well");
      debugInfo(testCase
          + " ** TEST ** The part of the topology with the right gen ID should work well");
      // Now create a change that must be replicated
      waitConnectionToReplicationDomain(baseDN, 1000);
@@ -683,9 +675,6 @@
      // To search the replication server db later in these tests, we need
      // to attach the search backend to the replication server just created.
      b = (ReplicationBackend)DirectoryServer.getBackend("replicationChanges");
      b.setServer(replServer1);
      debugInfo("Delay to allow DS to reconnect to replServer1");
      final long genIdAfterRestart = replServer1.getGenerationId(baseDN);
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
@@ -355,16 +355,8 @@
    assertNoConfigEntriesWithFilter("(objectclass=ds-cfg-replication-domain)",
      "Found unexpected replication domain config left");
    // Check for config entries for replication changes backend
    assertNoConfigEntriesWithFilter(
      "(ds-cfg-java-class=org.opends.server.replication.server.ReplicationBackend)",
      "Found unexpected replication changes backend config left");
    // Check for left domain object
    assertEquals(MultimasterReplication.getNumberOfDomains(), 0, "Some replication domain objects left");
    // Check for left replication changes backend object
    assertEquals(DirectoryServer.getBackend("replicationChanges"), null, "Replication changes backend object has been left");
  }
  protected void clearChangelogDB(ReplicationServer rs) throws Exception
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ReplicationServerTest.java
@@ -26,8 +26,6 @@
 */
package org.opends.server.replication.server;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketTimeoutException;
@@ -35,14 +33,11 @@
import org.assertj.core.api.Assertions;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.forgerock.opendj.ldap.DereferenceAliasesPolicy;
import org.forgerock.opendj.ldap.ModificationType;
import org.opends.server.TestCaseUtils;
import org.opends.server.api.SynchronizationProvider;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.ModifyDNOperationBasis;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.protocols.ldap.LDAPControl;
import org.opends.server.replication.ReplicationTestCase;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.CSNGenerator;
@@ -53,24 +48,15 @@
import org.opends.server.replication.plugin.ReplicationServerListener;
import org.opends.server.replication.protocol.*;
import org.opends.server.replication.service.ReplicationBroker;
import org.opends.server.tools.LDAPModify;
import org.opends.server.tools.LDAPSearch;
import org.opends.server.types.*;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.util.LDIFWriter;
import org.opends.server.util.TimeThread;
import org.opends.server.workflowelement.localbackend.LocalBackendModifyDNOperation;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static java.util.Collections.*;
import static org.forgerock.opendj.ldap.SearchScope.*;
import static org.opends.server.TestCaseUtils.*;
import static org.opends.server.replication.protocol.OperationContext.*;
import static org.forgerock.opendj.ldap.ResultCode.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.testng.Assert.*;
@@ -99,9 +85,6 @@
  private CSN unknownCSNServer1;
  private static final String exportLDIFAllFile = "exportLDIF.ldif";
  private String exportLDIFDomainFile;
  /**
   * Set up the environment for performing the tests in this Class.
   * Replication
@@ -164,7 +147,7 @@
   * This method is used to make sure that this order is always respected.
   * (Using testng dependency does not work)
   */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"})
  @Test(enabled = true)
  public void replicationServerTest() throws Exception
  {
    changelogBasic();
@@ -175,8 +158,6 @@
    newClientWithChangefromServer2();
    newClientWithUnknownChanges();
    stopChangelog();
    exportBackend();
    backupRestore();
  }
  /**
@@ -187,7 +168,7 @@
   * test is disabled and should only be enabled in workspaces but never
   * committed in the repository.
   */
  @Test(enabled=false, dependsOnMethods = { "searchBackend"})
  @Test(enabled=false)
  public void replicationServerTestLoop() throws Exception
  {
    changelogBasic();
@@ -473,7 +454,7 @@
   * This test is configured by a relatively low stress
   * but can be changed using TOTAL_MSG and CLIENT_THREADS consts.
   */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"})
  @Test(enabled = true)
  public void oneWriterMultipleReader() throws Exception
  {
    debugInfo("Starting oneWriterMultipleReader");
@@ -553,7 +534,7 @@
   * This test is configured for a relatively low stress
   * but can be changed using TOTAL_MSG and THREADS consts.
   */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"}, groups = "opendj-256")
  @Test(enabled = true, groups = "opendj-256")
  public void multipleWriterMultipleReader() throws Exception
  {
    debugInfo("Starting multipleWriterMultipleReader");
@@ -637,7 +618,7 @@
   * <li>Check that client 2 receives the changes published by client 1</li>
   * </ol>
   */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"})
  @Test(enabled = true)
  public void changelogChaining0() throws Exception
  {
    final String tn = "changelogChaining0";
@@ -735,7 +716,7 @@
   * <li>Check that client 2 receives the changes published by client 1</li>
   * <ol>
   */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"})
  @Test(enabled = true)
  public void changelogChaining1() throws Exception
  {
    final String tn = "changelogChaining1";
@@ -857,7 +838,7 @@
   * Test that the Replication sends back correctly WindowsUpdate
   * when we send a WindowProbeMsg.
   */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"})
  @Test(enabled = true)
  public void windowProbeTest() throws Exception
  {
    debugInfo("Starting windowProbeTest");
@@ -1085,415 +1066,6 @@
  }
  /**
   * Test backup and restore of the Replication server backend.
   */
  private void backupRestore() throws Exception
  {
    debugInfo("Starting backupRestore");
    executeTask(createBackupTask(), 20000);
    executeTask(createRestoreTask(), 20000);
    debugInfo("Ending backupRestore");
  }
   /**
    * Test export of the Replication server backend
    * - Creates 2 brokers connecting to the replication for 2 different baseDN
    * - Make these brokers publish changes to the replication server
    * - Launch a full export
    * - Launch a partial export on one of the 2 domains
    */
  private void exportBackend() throws Exception
  {
      debugInfo("Starting exportBackend");
      ReplicationBroker server1 = null;
      ReplicationBroker server2 = null;
    try
    {
      final DN baseDN2 = DN.valueOf("dc=domain2,dc=com");
      server1 = openReplicationSession(TEST_ROOT_DN, 1, 100, replicationServerPort, 1000);
      server2 = openReplicationSession(baseDN2, 2, 100, replicationServerPort, 1000);
        debugInfo("Publish changes");
        publishAll(server1, createChanges(TEST_ROOT_DN_STRING,  1));
        publishAll(server2, createChanges("dc=domain2,dc=com",  2));
      debugInfo("Export all");
      executeTask(createExportAllTask(), 20000);
      // Not doing anything with the export file, let's delete it
      new File(DirectoryServer.getInstanceRoot(), exportLDIFAllFile).delete();
      debugInfo("Export domain");
      executeTask(createExportDomainTask("dc=domain2,dc=com"), 20000);
      if (exportLDIFDomainFile != null)
      {
        // Not doing anything with the export file, let's delete it
        new File(DirectoryServer.getInstanceRoot(), exportLDIFDomainFile).delete();
      }
    }
    finally
    {
      stop(server1, server2);
    }
    debugInfo("Ending export");
  }
  private Entry createBackupTask() throws Exception
  {
     return TestCaseUtils.makeEntry(
     "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
     "objectclass: top",
     "objectclass: ds-task",
     "objectclass: ds-task-backup",
     "ds-task-class-name: org.opends.server.tasks.BackupTask",
     "ds-backup-directory-path: bak" + File.separator +
                        "replicationChanges",
     "ds-task-backup-backend-id: replicationChanges");
  }
  private Entry createRestoreTask() throws Exception
  {
     return TestCaseUtils.makeEntry(
     "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
     "objectclass: top",
     "objectclass: ds-task",
     "objectclass: ds-task-restore",
     "ds-task-class-name: org.opends.server.tasks.RestoreTask",
     "ds-backup-directory-path: bak" + File.separator +
                        "replicationChanges");
  }
  private Entry createExportAllTask() throws Exception
  {
     return TestCaseUtils.makeEntry(
     "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
     "objectclass: top",
     "objectclass: ds-task",
     "objectclass: ds-task-export",
     "ds-task-class-name: org.opends.server.tasks.ExportTask",
     "ds-task-export-ldif-file: " + exportLDIFAllFile,
     "ds-task-export-backend-id: replicationChanges",
     "ds-task-export-include-branch: dc=replicationChanges");
  }
  private Entry createExportDomainTask(String suffix) throws Exception
  {
     String root = suffix.substring(suffix.indexOf('=')+1, suffix.indexOf(','));
     exportLDIFDomainFile = "exportLDIF" + root +".ldif";
     return TestCaseUtils.makeEntry(
     "dn: ds-task-id=" + UUID.randomUUID() + ",cn=Scheduled Tasks,cn=Tasks",
     "objectclass: top",
     "objectclass: ds-task",
     "objectclass: ds-task-export",
     "ds-task-class-name: org.opends.server.tasks.ExportTask",
     "ds-task-export-ldif-file: " + exportLDIFDomainFile,
     "ds-task-export-backend-id: replicationChanges",
     "ds-task-export-include-branch: "+suffix+",dc=replicationChanges");
  }
   private List<UpdateMsg> createChanges(String suffix, int serverId) throws Exception
   {
     List<UpdateMsg> l = new ArrayList<UpdateMsg>();
     {
       String user1entryUUID = "33333333-3333-3333-3333-333333333333";
       String baseUUID       = "22222222-2222-2222-2222-222222222222";
       // - Add
       Entry entry = TestCaseUtils.entryFromLdifString(
       "dn: "+suffix+"\n"
           + "objectClass: top\n"
           + "objectClass: domain\n"
           + "entryUUID: 11111111-1111-1111-1111-111111111111\n");
       CSNGenerator csnGen = new CSNGenerator(serverId, TimeThread.getTime());
       DN exampleSuffixDN = DN.valueOf("o=example," + suffix);
       AddMsg addMsg = new AddMsg(csnGen.newCSN(), exampleSuffixDN,
           user1entryUUID, baseUUID, entry.getObjectClassAttribute(),
           entry.getAttributes(), new ArrayList<Attribute>());
       l.add(addMsg);
       // - Add
       Entry uentry = TestCaseUtils.entryFromLdifString(
             "dn: cn=Fiona Jensen,ou=People,"+suffix+"\n"
           + "objectClass: top\n"
           + "objectclass: person\n"
           + "objectclass: organizationalPerson\n"
           + "objectclass: inetOrgPerson\n"
           + "cn: Fiona Jensen\n"
           + "sn: Jensen\n"
           + "givenName: fjensen\n"
           + "telephonenumber: +1 408 555 1212\n"
           + "entryUUID: " + user1entryUUID +"\n"
           + "userpassword: fjen$$en" + "\n");
       DN newPersonDN = DN.valueOf("uid=new person,ou=People,"+suffix);
       AddMsg addMsg2 = new AddMsg(
           csnGen.newCSN(),
           newPersonDN,
           user1entryUUID,
           baseUUID,
           uentry.getObjectClassAttribute(),
           uentry.getAttributes(),
           new ArrayList<Attribute>());
       l.add(addMsg2);
       // - Modify
       Attribute attr1 = Attributes.create("description", "new value");
       Attribute attr2 = Attributes.create("modifiersName", "cn=Directory Manager,cn=Root DNs,cn=config");
       Attribute attr3 = Attributes.create("modifyTimestamp", "20070917172420Z");
       List<Modification> mods = Arrays.asList(
           new Modification(ModificationType.REPLACE, attr1),
           new Modification(ModificationType.REPLACE, attr2),
           new Modification(ModificationType.REPLACE, attr3));
       DN dn = exampleSuffixDN;
       ModifyMsg modMsg = new ModifyMsg(csnGen.newCSN(), dn, mods, "fakeuniqueid");
       l.add(modMsg);
       // Modify DN
       ModifyDNMsg  modDnMsg = new ModifyDNMsg(newPersonDN, csnGen.newCSN(),
           user1entryUUID, baseUUID, false,
           "uid=wrong, ou=people,"+suffix, "uid=newrdn");
       l.add(modDnMsg);
       // Del
       DeleteMsg delMsg = new DeleteMsg(exampleSuffixDN, csnGen.newCSN(), "uid");
       l.add(delMsg);
     }
     return l;
   }
   /**
    * Testing searches on the backend of the replication server.
    * @throws Exception
    */
   @Test(enabled=true)
   public void searchBackend() throws Exception
   {
     debugInfo("Starting searchBackend");
     ReplicationBroker server1 = null;
    try
    {
      InternalSearchOperation op =
          connection.processSearch("cn=monitor", WHOLE_SUBTREE, "(objectclass=*)");
      assertEquals(op.getResultCode(), SUCCESS, op.getErrorMessage().toString());
      clearChangelogDB(replicationServer);
       ByteArrayOutputStream stream = new ByteArrayOutputStream();
       LDIFExportConfig exportConfig = new LDIFExportConfig(stream);
       LDIFWriter ldifWriter = new LDIFWriter(exportConfig);
       debugInfo("Create broker");
       server1 = openReplicationSession(TEST_ROOT_DN, 1, 100, replicationServerPort, 1000);
       debugInfo("Publish changes");
       List<UpdateMsg> msgs = createChanges(TEST_ROOT_DN_STRING, 1);
       publishAll(server1, msgs);
       Thread.sleep(500);
       // Sets manually the association backend-replication server since
       // no config object exist for our replication server.
       ReplicationBackend b =
         (ReplicationBackend)DirectoryServer.getBackend("replicationChanges");
       b.setServer(replicationServer);
       assertEquals(b.getEntryCount(), msgs.size());
       assertTrue(b.entryExists(DN.valueOf("dc=replicationChanges")));
       SearchFilter filter=SearchFilter.createFilterFromString("(objectclass=*)");
       assertTrue(b.isIndexed(filter));
       List<Control> requestControls = new LinkedList<Control>();
       requestControls.add(new LDAPControl(OID_INTERNAL_GROUP_MEMBERSHIP_UPDATE, false));
       DN baseDN=DN.valueOf("dc=replicationChanges");
       //Test the group membership control causes search to be skipped.
       InternalSearchOperation internalSearch =
          connection.processSearch(baseDN, WHOLE_SUBTREE,
              DereferenceAliasesPolicy.NEVER, 0, 0, false, filter, null,
              requestControls, null);
       assertEquals(internalSearch.getResultCode(), ResultCode.SUCCESS);
       assertTrue(internalSearch.getSearchEntries().isEmpty());
      assertSearchResult("dc=oops", "(changetype=*)", NO_SUCH_OBJECT, 0);
       // TODO:  testReplicationBackendACIs() is disabled because it
       // is currently failing when run in the nightly target.
       // anonymous search returns entries from replication backend whereas it
       // should not. Probably a previous test in the nightlytests suite is
       // removing/modifying some ACIs...When problem found, we have to re-enable
       // this test.
       // testReplicationBackendACIs();
      op = assertSearchResult("dc=replicationChanges", "(changetype=*)", SUCCESS, 5);
       debugInfo("Search result");
       List<SearchResultEntry> entries = op.getSearchEntries();
       if (entries != null)
       {
         for (SearchResultEntry entry : entries)
         {
           debugInfo(entry.toLDIFString());
           ldifWriter.writeEntry(entry);
         }
       }
       debugInfo("\n" + stream.toString());
       debugInfo("Query / filter based on changetype");
      assertSearchResult("dc=replicationChanges", "(changetype=add)", SUCCESS, 2);
      assertSearchResult("dc=replicationChanges", "(changetype=modify)", SUCCESS, 1);
      assertSearchResult("dc=replicationChanges", "(changetype=moddn)", SUCCESS, 1);
      assertSearchResult("dc=replicationChanges", "(changetype=delete)", SUCCESS, 1);
       debugInfo("Query / filter based on objectclass");
      assertSearchResult("dc=replicationChanges", "(objectclass=person)", SUCCESS, 1);
       /*
        * It would be nice to be have the abilities to search for
        * entries in the replication backend using the DN on which the
        * operation was done as the search criteria.
        * This is not possible yet, this part of the test is therefore
        * disabled.
        *
        * debugInfo("Query / searchBase");
        * op = connection.processSearch(
        *    ByteString.valueOf("uid=new person,ou=People,dc=example,dc=com,dc=replicationChanges"),
        *    SearchScope.WHOLE_SUBTREE,
        *    LDAPFilter.decode("(changetype=*)"));
        * assertEquals(op.getResultCode(), ResultCode.SUCCESS);
        * assertEquals(op.getSearchEntries().size(), 2);
        */
       debugInfo("Query / 1 attrib");
      op = connection.processSearch("dc=replicationChanges",
             WHOLE_SUBTREE, DereferenceAliasesPolicy.NEVER, 0, 0, false,
              "(changetype=moddn)", singleton("newrdn"));
       assertEquals(op.getResultCode(), ResultCode.SUCCESS);
       assertEquals(op.getSearchEntries().size(), 1);
       entries = op.getSearchEntries();
       if (entries != null)
       {
         for (SearchResultEntry entry : entries)
         {
           debugInfo(entry.toLDIFString());
           ldifWriter.writeEntry(entry);
         }
       }
       debugInfo("Query / All attribs");
      op = connection.processSearch("dc=replicationChanges",
             WHOLE_SUBTREE, DereferenceAliasesPolicy.NEVER, 0, 0, false,
              "(changetype=*)", singleton("*"));
       assertEquals(op.getResultCode(), ResultCode.SUCCESS);
       assertEquals(op.getSearchEntries().size(), 5);
       debugInfo("Successfully ending searchBackend");
     } finally {
      stop(server1);
     }
   }
  private void publishAll(ReplicationBroker broker, List<UpdateMsg> msgs)
  {
    for (UpdateMsg msg : msgs)
    {
      broker.publish(msg);
    }
  }
  private InternalSearchOperation assertSearchResult(String baseDN,
      String filterString, ResultCode rc, int nbEntriesReturned)
      throws Exception
  {
    InternalSearchOperation op =
        connection.processSearch(baseDN, WHOLE_SUBTREE, filterString);
    assertEquals(op.getResultCode(), rc, op.getErrorMessage().toString());
    if (SUCCESS.equals(rc))
    {
      assertEquals(op.getSearchEntries().size(), nbEntriesReturned);
    }
    return op;
  }
  private void testReplicationBackendACIs() throws Exception
  {
     ByteArrayOutputStream oStream = new ByteArrayOutputStream();
     ByteArrayOutputStream eStream = new ByteArrayOutputStream();
     // test search as anonymous
     String[] args =
     {
       "-h", "127.0.0.1",
       "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
       "-b", "dc=replicationChanges",
       "-s", "sub",
      "--noPropertiesFile",
       "(objectClass=*)"
     };
     oStream.reset();
     eStream.reset();
    int retVal = LDAPSearch.mainSearch(args, false, oStream, eStream);
     String entries = oStream.toString();
     debugInfo("Entries:" + entries);
     assertEquals(0, retVal,  "Returned error: " + eStream);
     assertEquals(entries, "",  "Returned entries: " + entries);
     // test search as directory manager returns content
     String[] args3 =
     {
       "-h", "127.0.0.1",
       "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
       "-D", "cn=Directory Manager",
       "-w", "password",
       "-b", "dc=replicationChanges",
       "-s", "sub",
       "--noPropertiesFile",
       "(objectClass=*)"
     };
     oStream.reset();
     eStream.reset();
    retVal = LDAPSearch.mainSearch(args3, false, oStream, eStream);
     entries = oStream.toString();
     debugInfo("Entries:" + entries);
     assertEquals(0, retVal,  "Returned error: " + eStream);
     assertTrue(!entries.equalsIgnoreCase(""), "Returned entries: " + entries);
    // test write fails : unwilling to perform
    String ldif =
        "dn: dc=foo, dc=replicationchanges\n"
        + "objectclass: top\n"
        + "objectClass: domain\n"
        + "dc:foo\n";
    String path = TestCaseUtils.createTempFile(ldif);
    String[] args4 =
    {
        "-h", "127.0.0.1",
        "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
        "-D", "cn=Directory Manager",
        "-w", "password",
        "--noPropertiesFile",
        "-a",
        "-f", path
    };
    retVal = LDAPModify.mainModify(args4, false, oStream, eStream);
    assertEquals(retVal, 53, "Returned error: " + eStream);
  }
   /**
    * Replication Server configuration test of the replication Server code with
    * 2 replication servers involved
    *
@@ -1511,7 +1083,7 @@
    * - Make client 1 publish a change
    * - Check that client 2 does not receive the change
    */
  @Test(enabled=true, dependsOnMethods = { "searchBackend"}, groups = "opendj-256")
  @Test(enabled = true, groups = "opendj-256")
  public void replicationServerConnected() throws Exception
  {
     clearChangelogDB(replicationServer);