From 53c232421f375fb7aec505cd3f152511aed47167 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 22 Oct 2009 13:31:32 +0000
Subject: [PATCH] Control Panel fix for issue 4302 (Unexpected errors using single JNDI connection with SSL and multiple threads.)
---
opends/src/guitools/org/opends/guitools/controlpanel/util/LDAPEntryReader.java | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/util/LDAPEntryReader.java b/opends/src/guitools/org/opends/guitools/controlpanel/util/LDAPEntryReader.java
index 6e8ffc8..db80d86 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/util/LDAPEntryReader.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/util/LDAPEntryReader.java
@@ -52,6 +52,7 @@
private InitialLdapContext ctx;
private Set<EntryReadListener> listeners = new HashSet<EntryReadListener>();
private boolean isOver;
+ private boolean notifyListeners;
/**
* Constructor of the entry reader.
@@ -62,6 +63,7 @@
{
this.dn = dn;
this.ctx = ctx;
+ this.notifyListeners = true;
}
/**
@@ -102,7 +104,7 @@
public void backgroundTaskCompleted(CustomSearchResult sr,
Throwable throwable)
{
- if (!isInterrupted())
+ if (!isInterrupted() && isNotifyListeners())
{
if (throwable == null)
{
@@ -117,6 +119,28 @@
}
/**
+ * Returns whether this entry reader will notify the listeners once it is
+ * over.
+ * @return whether this entry reader will notify the listeners once it is
+ * over.
+ */
+ public boolean isNotifyListeners()
+ {
+ return notifyListeners;
+ }
+
+ /**
+ * Sets whether this entry reader will notify the listeners once it is
+ * over.
+ * @param notifyListeners whether this entry reader will notify the listeners
+ * once it is over.
+ */
+ public void setNotifyListeners(boolean notifyListeners)
+ {
+ this.notifyListeners = notifyListeners;
+ }
+
+ /**
* Returns <CODE>true</CODE> if the read process is over and
* <CODE>false</CODE> otherwise.
* @return <CODE>true</CODE> if the read process is over and
--
Gitblit v1.10.0