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

gbellato
17.50.2009 a34885423c29c71790f0e9d0871f100ac477c46d
Fix for  3300 : Cannot start server if backend of replicated suffix is disabled

If a backend is disabled the Server will now start but the replication will be disabled
and and error will be logged :

[16/Mar/2009:10:39:31 +0100] category=SYNC severity=SEVERE_ERROR msgID=14942362 msg=The Replication was not started on base-dn cn=dc=example\,dc=com (domain 25795),cn=domains,cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config : An unexpected error occurred when looking for the replicated backend : dc=example,dc=com. It may be not configured or disabled


The server will need to be restarted in order to enable replication on this base-dn
2 files modified
33 ■■■■■ changed files
opends/src/messages/messages/replication.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java 31 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/replication.properties
@@ -362,3 +362,5 @@
reset for domain %s
NOTICE_ERR_CANNOT_CHANGE_CONFIG_DURING_TOTAL_UPDATE_153=Cannot change the \
 configuration while a total update is in progress
SEVERE_ERR_COULD_NOT_START_REPLICATION_154=The Replication was not started \
 on base-dn %s : %s
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
@@ -74,6 +74,9 @@
import org.opends.server.types.operation.PreOperationModifyDNOperation;
import org.opends.server.types.operation.PreOperationModifyOperation;
import static org.opends.messages.ReplicationMessages.*;
import static org.opends.server.loggers.ErrorLogger.logError;
/**
 * This class is used to load the Replication code inside the JVM
 * and to trigger initialization of the replication.
@@ -193,18 +196,26 @@
      throws ConfigException
  {
    LDAPReplicationDomain domain;
    domain = new LDAPReplicationDomain(configuration, updateToReplayQueue);
    if (domains.size() == 0)
    try
    {
      /*
       * Create the threads that will process incoming update messages
       */
      createReplayThreads();
    }
      domain = new LDAPReplicationDomain(configuration, updateToReplayQueue);
      if (domains.size() == 0)
      {
        /*
         * Create the threads that will process incoming update messages
         */
        createReplayThreads();
      }
    domains.put(domain.getBaseDN(), domain);
    return domain;
      domains.put(domain.getBaseDN(), domain);
      return domain;
    }
    catch (ConfigException e)
    {
      logError(ERR_COULD_NOT_START_REPLICATION.get(
          configuration.dn().toString(), e.getLocalizedMessage()));
      return null;
    }
  }
  /**