From 08f9243b55eb5f0f8030eebe976a0d85ffbd44c2 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 30 Jul 2010 15:11:25 +0000
Subject: [PATCH] Implements a configurable limit in the number of persistent searches a server can handle.
---
opends/src/server/org/opends/server/core/PersistentSearch.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/PersistentSearch.java b/opends/src/server/org/opends/server/core/PersistentSearch.java
index 616ec1a..bb670e4 100644
--- a/opends/src/server/org/opends/server/core/PersistentSearch.java
+++ b/opends/src/server/org/opends/server/core/PersistentSearch.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2009 Sun Microsystems, Inc.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -121,6 +121,9 @@
psearch.searchOperation.getClientConnection().deregisterPersistentSearch(
psearch);
+ //Decrement of psearch count maintained by the server.
+ DirectoryServer.deregisterPersistentSearch();
+
// Notify any cancellation callbacks.
for (CancellationCallback callback : psearch.cancellationCallbacks)
{
@@ -774,6 +777,8 @@
{
searchOperation.getClientConnection().registerPersistentSearch(this);
searchOperation.setSendResponse(false);
+ //Register itself with the Core.
+ DirectoryServer.registerPersistentSearch();
}
--
Gitblit v1.10.0