directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <>
Subject Persistent Search
Date Mon, 22 Jul 2013 10:45:42 GMT
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, String,....) returns a EntryCursor, and not a
SearchCursor, whereas a does return a
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 =;

  while ( {
    Response response = cursor.get();

When I run this code without the Control it returns the entries I expect,
but with the Control, it somehow blocks at 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


Met vriendelijke groet,

Alexander Broekhuis

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message