Return-Path: X-Original-To: apmail-directory-api-archive@minotaur.apache.org Delivered-To: apmail-directory-api-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D314F1096F for ; Mon, 22 Jul 2013 10:46:17 +0000 (UTC) Received: (qmail 52350 invoked by uid 500); 22 Jul 2013 10:46:17 -0000 Delivered-To: apmail-directory-api-archive@directory.apache.org Received: (qmail 52263 invoked by uid 500); 22 Jul 2013 10:46:12 -0000 Mailing-List: contact api-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: api@directory.apache.org Delivered-To: mailing list api@directory.apache.org Received: (qmail 52207 invoked by uid 99); 22 Jul 2013 10:46:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jul 2013 10:46:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of a.broekhuis@gmail.com designates 209.85.215.43 as permitted sender) Received: from [209.85.215.43] (HELO mail-la0-f43.google.com) (209.85.215.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jul 2013 10:46:03 +0000 Received: by mail-la0-f43.google.com with SMTP id fh20so3407756lab.30 for ; Mon, 22 Jul 2013 03:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=V8y1nzsAuivjsE89DBUJvzcfdK76fSLnD3TOoFOjgGQ=; b=0A76HHVUSvbUTZOGi+to8mQDMRxxW1LRLsV8PZz8pVDQwBIQXLKGxePRwIh4fdn3ds tFlE4Ld7KUw9XxiNdh8c5E5n/PJeSWRPQBO+vqrvB3tTMkM+uBMLBnHdBIdHotHdHDLh AtZzfqBlvG8Eweha01UX7XQDLY8PtcEnwSePxuuig9nWcwOtFOG4n4rmJVpnohtpEYcw q93Ns8dGT9OXVFANrmxVQhfNbaS2XLmg/JarsyM3SpyUvfSzEvHpinT5Btwl2gYQ2daL lQTQ9acIXofyrDCiQNkiiXzQlfjAKj76xD9/Vu5AwJBYY857muUz4XmrngUYfLTtw7jE pN1w== MIME-Version: 1.0 X-Received: by 10.112.5.134 with SMTP id s6mr11982089lbs.95.1374489943092; Mon, 22 Jul 2013 03:45:43 -0700 (PDT) Received: by 10.112.33.239 with HTTP; Mon, 22 Jul 2013 03:45:42 -0700 (PDT) Date: Mon, 22 Jul 2013 12:45:42 +0200 Message-ID: Subject: Persistent Search From: Alexander Broekhuis To: api@directory.apache.org Content-Type: multipart/alternative; boundary=14dae94ed641ce367904e2176048 X-Virus-Checked: Checked by ClamAV on apache.org --14dae94ed641ce367904e2176048 Content-Type: text/plain; charset=ISO-8859-1 Hi all, I am looking into ApacheDS and the Api to work with the server. I am trying to implement some of the examples used in the documentation, but there are several small things differently with the latest release? Eg a connection.search(String, String,....) returns a EntryCursor, and not a SearchCursor, whereas a connection.search(SearchRequest) does return a SearchCursor. So a first question, why this difference? And what way is the best/preferred way to do a search etc? My next question is about PersistentSearch, how do I do this? For example, I have the following code: SearchRequest searchRequest = new SearchRequestImpl().setBase( new Dn( "ou=system" ) ).setFilter( "objectclass=*)").setScope( SearchScope.ONELEVEL).addControl( new PersistentSearchImpl() ); SearchCursor cursor = con.search(searchRequest); while (cursor.next()) { Response response = cursor.get(); System.out.println(((SearchResultEntry)response).getEntry()); } cursor.close(); When I run this code without the Control it returns the entries I expect, but with the Control, it somehow blocks at cursor.next(). I am not even sure this is the correct way to do a persistent search, I can't find any documentation on this at all. Also, when I have a persistent search, how can I get a call that the result has been changed? Eg entry added/removed etc. Thanks, -- Met vriendelijke groet, Alexander Broekhuis --14dae94ed641ce367904e2176048--