From 6a463421b18317cc8a4e4b4d32eb1ab4cb38cf79 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Thu, 05 Jul 2007 12:19:08 +0000
Subject: [PATCH] Fix for issue 1874, 1875
---
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java | 62 ++++++++++++-------------------
1 files changed, 24 insertions(+), 38 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
index ac429e8..bf943ad 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -366,25 +366,22 @@
/*
* create the broker object used to publish and receive changes
*/
+ broker = new ReplicationBroker(state, baseDN, serverId, maxReceiveQueue,
+ maxReceiveDelay, maxSendQueue, maxSendDelay, window,
+ heartbeatInterval);
+
+ broker.start(replicationServers);
+
+ // Retrieves the related backend and its config entry
try
{
- broker = new ReplicationBroker(state, baseDN, serverId, maxReceiveQueue,
- maxReceiveDelay, maxSendQueue, maxSendDelay, window,
- heartbeatInterval);
- synchronized (broker)
- {
- broker.start(replicationServers);
- }
-
- // Retrieves the related backend and its config entry
retrievesBackendInfos(baseDN);
-
- } catch (Exception e)
+ } catch (DirectoryException e)
{
- /* TODO should mark that replicationServer service is
- * not available, log an error and retry upon timeout
- * should we stop the modifications ?
- */
+ // The backend associated to this suffix is not able to
+ // perform export and import.
+ // The replication can continue but this replicationDomain
+ // won't be able to use total update.
}
/*
@@ -2076,18 +2073,8 @@
state.loadState();
disabled = false;
- try
- {
- broker.start(replicationServers);
- } catch (Exception e)
- {
- /* TODO should mark that replicationServer service is
- * not available, log an error and retry upon timeout
- * should we stop the modifications ?
- */
- e.printStackTrace();
- return;
- }
+ broker.start(replicationServers);
+
createListeners();
}
@@ -2394,23 +2381,22 @@
ResultCode.OTHER, message, msgID, null);
}
- if (! domainBackend.supportsLDIFExport())
- {
- int msgID = MSGID_LDIFIMPORT_CANNOT_IMPORT;
- String message = getMessage(msgID, domainBackend.getBackendID());
- logError(ErrorLogCategory.BACKEND,
- ErrorLogSeverity.SEVERE_ERROR, message, msgID);
- throw new DirectoryException(
- ResultCode.OTHER, message, msgID, null);
- }
-
-
this.backend = domainBackend;
this.branches = new ArrayList<DN>(backendCfg.getBackendBaseDN().size());
for (DN dn : backendCfg.getBackendBaseDN())
{
this.branches.add(dn);
}
+
+ if (! domainBackend.supportsLDIFImport())
+ {
+ int msgID = MSGID_LDIFIMPORT_CANNOT_IMPORT;
+ String message = getMessage(msgID, baseDN);
+ logError(ErrorLogCategory.SYNCHRONIZATION,
+ ErrorLogSeverity.NOTICE, message, msgID);
+ throw new DirectoryException(
+ ResultCode.OTHER, message, msgID, null);
+ }
}
--
Gitblit v1.10.0