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

jvergara
20.53.2009 5991fd9ccc2c1635668cc4b8e4bae181d09b460e
opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -335,8 +335,7 @@
    // program.
    try
    {
      argParser = new ReplicationCliArgumentParser(CLASS_NAME);
      argParser.initializeParser(getOutputStream());
      createArgumenParser();
    }
    catch (ArgumentException ae)
    {
@@ -574,6 +573,12 @@
    return returnValue.getReturnCode();
  }
  private void createArgumenParser() throws ArgumentException
  {
    argParser = new ReplicationCliArgumentParser(CLASS_NAME);
    argParser.initializeParser(getOutputStream());
  }
  /**
   * Based on the data provided in the command-line it enables replication
   * between two servers.
@@ -7588,9 +7593,29 @@
    }
  }
  private void initializeAllSuffix(String baseDN, InitialLdapContext ctx,
  /**
   * Initializes all the replicas in the topology with the contents of a
   * given replica.
   * @param ctx the connection to the server where the source replica of the
   * initialization is.
   * @param baseDN the dn of the suffix.
   * @param displayProgress whether we want to display progress or not.
   * @throws ReplicationCliException if an unexpected error occurs.
   */
  public void initializeAllSuffix(String baseDN, InitialLdapContext ctx,
  boolean displayProgress) throws ReplicationCliException
  {
    if (argParser == null)
    {
      try
      {
        createArgumenParser();
      }
      catch (ArgumentException ae)
      {
        throw new RuntimeException("Error creating argument parser: "+ae, ae);
      }
    }
    int nTries = 5;
    boolean initDone = false;
    while (!initDone)
@@ -7836,9 +7861,10 @@
  }
  /**
   * Initializes a suffix with the contents of a replica that has a given
   * replication id.
   * @param ctx the connection to the server whose suffix we want to initialize.
   * Initializes all the replicas in the topology with the contents of a
   * given replica.  This method will try to create the task only once.
   * @param ctx the connection to the server where the source replica of the
   * initialization is.
   * @param baseDN the dn of the suffix.
   * @param displayProgress whether we want to display progress or not.
   * @throws ApplicationException if an unexpected error occurs.