From f8beabcaa885bfef30f2bd4011d040186cf9ea78 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 21 Apr 2009 19:16:11 +0000
Subject: [PATCH] Fix for issue 3011:
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 57 +--------------------------------------------------------
1 files changed, 1 insertions(+), 56 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index dae0c0f..6dbb1f0 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -242,7 +242,7 @@
* components.
*/
public class DirectoryServer
- implements Thread.UncaughtExceptionHandler, AlertGenerator
+ implements AlertGenerator
{
/**
* The tracer object for the debug logger.
@@ -717,10 +717,6 @@
private SynchronizationProviderConfigManager
synchronizationProviderConfigManager;
- // The thread group for all threads associated with the Directory Server.
- private ThreadGroup directoryThreadGroup;
-
-
// Registry for base DN and naming context information.
private BaseDnRegistry baseDnRegistry;
@@ -1038,23 +1034,12 @@
}
- // Create the thread group that should be used for all Directory Server
- // threads.
- directoryThreadGroup = new ThreadGroup("Directory Server Thread Group");
-
-
// Add a shutdown hook so that the server can be notified when the JVM
// starts shutting down.
shutdownHook = new DirectoryServerShutdownHook();
Runtime.getRuntime().addShutdownHook(shutdownHook);
- // Register this class as the default uncaught exception handler for the
- // JVM. The uncaughtException method will be called if a thread dies
- // because it did not properly handle an exception.
- Thread.setDefaultUncaughtExceptionHandler(this);
-
-
// Create the MBean server that we will use for JMX interaction.
initializeJMX();
@@ -2912,20 +2897,6 @@
/**
- * Retrieves the thread group that should be used by all threads associated
- * with the Directory Server.
- *
- * @return The thread group that should be used by all threads associated
- * with the Directory Server.
- */
- public static ThreadGroup getDirectoryThreadGroup()
- {
- return directoryServer.directoryThreadGroup;
- }
-
-
-
- /**
* Retrieves a reference to the Directory Server configuration handler.
*
* @return A reference to the Directory Server configuration handler.
@@ -9090,8 +9061,6 @@
alerts.put(ALERT_TYPE_SERVER_STARTED, ALERT_DESCRIPTION_SERVER_STARTED);
alerts.put(ALERT_TYPE_SERVER_SHUTDOWN, ALERT_DESCRIPTION_SERVER_SHUTDOWN);
- alerts.put(ALERT_TYPE_UNCAUGHT_EXCEPTION,
- ALERT_DESCRIPTION_UNCAUGHT_EXCEPTION);
alerts.put(ALERT_TYPE_ENTERING_LOCKDOWN_MODE,
ALERT_DESCRIPTION_ENTERING_LOCKDOWN_MODE);
alerts.put(ALERT_TYPE_LEAVING_LOCKDOWN_MODE,
@@ -9103,30 +9072,6 @@
/**
- * Provides a means of handling a case in which a thread is about to die
- * because of an unhandled exception. This method does nothing to try to
- * prevent the death of that thread, but will at least log it so that it can
- * be available for debugging purposes.
- *
- * @param thread The thread that threw the exception.
- * @param exception The exception that was thrown but not properly handled.
- */
- public void uncaughtException(Thread thread, Throwable exception)
- {
- if (debugEnabled())
- {
- TRACER.debugCaught(DebugLogLevel.ERROR, exception);
- }
-
- Message message = ERR_UNCAUGHT_THREAD_EXCEPTION.get(
- thread.getName(), stackTraceToString(exception));
- logError(message);
- sendAlertNotification(this, ALERT_TYPE_UNCAUGHT_EXCEPTION, message);
- }
-
-
-
- /**
* Indicates whether the server is currently in the process of shutting down.
* @return <CODE>true</CODE> if this server is currently in the process of
* shutting down and <CODE>false</CODE> otherwise.
--
Gitblit v1.10.0