From 735cca98b5e15c79ee0eee4c78111d38a0604861 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Tue, 29 Jan 2013 10:56:28 +0000
Subject: [PATCH] Implement enhancement for OPENDJ-677. The connection attribute under cn=monitor now contains the number of persistent searches on going if there are any, as shown below. If there are no persistent search, then nothing is displayed.

---
 opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
index 3c686a8..250cf94 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -23,7 +23,7 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2010-2012 ForgeRock AS.
+ *      Portions Copyright 2010-2013 ForgeRock AS.
  */
 package org.opends.server.protocols.ldap;
 
@@ -2480,6 +2480,13 @@
     buffer.append(operationsInProgress.size());
     buffer.append("\"");
 
+    int countPSearch = getPersistentSearches().size();
+    if (countPSearch > 0)
+    {
+      buffer.append("\" persistentSearches=\"");
+      buffer.append(countPSearch);
+      buffer.append("\"");
+    }
     return buffer.toString();
   }
 

--
Gitblit v1.10.0