From f8694ed7365096addbb23f82e0bf492fa87d2964 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 01 Sep 2006 21:30:06 +0000
Subject: [PATCH] Make some minor changes to the server that will aid in setting up the test environment. The following changes are included:
---
opendj-sdk/opends/src/server/org/opends/server/api/DirectoryThread.java | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/api/DirectoryThread.java b/opendj-sdk/opends/src/server/org/opends/server/api/DirectoryThread.java
index 109a117..ed59d1a 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/api/DirectoryThread.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/api/DirectoryThread.java
@@ -32,6 +32,8 @@
import org.opends.server.core.DirectoryServer;
import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.util.ServerConstants.*;
+import static org.opends.server.util.StaticUtils.*;
@@ -70,10 +72,11 @@
// The task with which this thread is associated, if any.
private Task task;
-
// A reference to the thread that was used to create this thread.
private Thread parentThread;
+
+
/**
* Creates a new instance of this directory thread with the
* specified name and with the specified target as its run object.
@@ -147,8 +150,22 @@
{
task = null;
}
+
+ String forceDaemonStr =
+ System.getProperty(PROPERTY_FORCE_DAEMON_THREADS);
+ if (forceDaemonStr != null)
+ {
+ String lowerStr = toLowerCase(forceDaemonStr);
+ if (lowerStr.equals("true") || lowerStr.equals("yes") ||
+ lowerStr.equals("on") || lowerStr.equals("1"))
+ {
+ setDaemon(true);
+ }
+ }
}
+
+
/**
* Retrieves the stack trace that was captured at the time that this
* thread was created.
--
Gitblit v1.10.0