From a34885423c29c71790f0e9d0871f100ac477c46d Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Tue, 17 Mar 2009 07:50:10 +0000
Subject: [PATCH] Fix for 3300 : Cannot start server if backend of replicated suffix is disabled
---
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java | 31 +++++++++++++++++++++----------
opends/src/messages/messages/replication.properties | 2 ++
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/opends/src/messages/messages/replication.properties b/opends/src/messages/messages/replication.properties
index 2857292..88a5478 100644
--- a/opends/src/messages/messages/replication.properties
+++ b/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
diff --git a/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java b/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
index 2afd51d..8110a81 100644
--- a/opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java
+++ b/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;
+ }
}
/**
--
Gitblit v1.10.0