From c3b3c95ffb78611020b1affce1db4bcf326896db Mon Sep 17 00:00:00 2001
From: fdorson <fdorson@localhost>
Date: Thu, 03 Jul 2008 12:30:32 +0000
Subject: [PATCH] fix for issue #3317 : Removing replication links requires re-start of the server and issue #3363 : NullPointerException in ReplicationBroker.java
---
opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java b/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
index 5c11a47..91d3227b 100644
--- a/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -2248,12 +2248,14 @@
disabled = true;
// Stop the listener thread
- listenerThread.shutdown();
+ if (listenerThread != null)
+ listenerThread.shutdown();
broker.stop(); // This will cut the session and wake up the listener
// Wait for the listener thread to stop
- listenerThread.waitForShutdown();
+ if (listenerThread != null)
+ listenerThread.waitForShutdown();
}
/**
@@ -3465,6 +3467,12 @@
maxSendQueue, maxSendDelay, window, heartbeatInterval);
isolationpolicy = configuration.getIsolationPolicy();
+ // To be able to stop and restart the broker properly just
+ // disable and enable the domain. That way a new session
+ // with the new configuration is available.
+ this.disable();
+ this.enable();
+
return new ConfigChangeResult(ResultCode.SUCCESS, false);
}
--
Gitblit v1.10.0