From 87634d96bab9626809797c5d2dad68b07ec2961f Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 05 Apr 2007 22:42:35 +0000
Subject: [PATCH] Update the server so that it is possible to start in a mode in which the server is completely functional but does not accept connections from external clients. This will be available if the org.opends.server.DisableConnectionHandlers property is set with a value of "true".

---
 opends/src/server/org/opends/server/core/DirectoryServer.java |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index eb9f952..0bb1d84 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -967,6 +967,14 @@
       }
 
 
+      // Determine whether or not we should start the connection handlers.
+      String disableProperty =
+                  System.getProperty(PROPERTY_DISABLE_CONNECTION_HANDLERS);
+      boolean startConnectionHandlers =
+                   ((disableProperty == null) ||
+                    (! disableProperty.equalsIgnoreCase("true")));
+
+
       // Initialize all the schema elements.
       initializeSchema();
 
@@ -1052,7 +1060,10 @@
 
 
       // Initialize all the connection handlers.
-      initializeConnectionHandlers();
+      if (startConnectionHandlers)
+      {
+        initializeConnectionHandlers();
+      }
 
 
       // Initialize all the monitor providers.
@@ -1093,9 +1104,12 @@
 
       // At this point, we should be ready to go.  Start all the connection
       // handlers.
-      for (ConnectionHandler c : connectionHandlers)
+      if (startConnectionHandlers)
       {
-        c.start();
+        for (ConnectionHandler c : connectionHandlers)
+        {
+          c.start();
+        }
       }
 
 

--
Gitblit v1.10.0