From 16e0eb720faae6548b0903a4ceef18c3f333592a Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Tue, 03 Oct 2006 06:59:43 +0000
Subject: [PATCH] In the previous implementation, each time we had a configuration change, the JMX connector **AND** the RMI registry was closed.

---
 opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java b/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
index 3fd9e68..3bfda41 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
@@ -505,7 +505,9 @@
       String finalizeReason, boolean closeConnections)
   {
     assert debugEnter(CLASS_NAME, "finalizeConnectionHandler");
-    rmiConnector.finalizeConnectionHandler(closeConnections);
+
+    // We should also close the RMI registry.
+    rmiConnector.finalizeConnectionHandler(closeConnections, true);
   }
 
   /**
@@ -552,7 +554,8 @@
   public void processServerShutdown(String reason)
   {
     assert debugEnter(CLASS_NAME, "processServerShutdown");
-    rmiConnector.finalizeConnectionHandler(true);
+    //  We should also close the RMI registry.
+    rmiConnector.finalizeConnectionHandler(true, true);
 
   }
 
@@ -795,7 +798,8 @@
     //
     // Stop the current connector
     // TODO Set Msg
-    this.finalizeConnectionHandler("new config", true);
+    this.rmiConnector.finalizeConnectionHandler(true,
+        (listenPort != newListenPort));
 
     //
     // set new params and update JMX attributes

--
Gitblit v1.10.0