directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fisher <dfis...@vt.edu>
Subject Re: Paged Results Control
Date Wed, 29 Jun 2011 12:28:19 GMT
I'm testing OpenLDAP 2.4.23 with bdb. Paged results work fine with JNDI and
JLDAP, so I'm confident the server is configured correctly. I glanced at the
studio code, but I didn't see anything that wasn't using or delegating to a
JNDI PagedResultsControl. Can you point me to some source that uses
org.apache.directory.shared.ldap.model.message.controls.PagedResultsImpl
? Thanks.

--Daniel Fisher

On Wed, Jun 29, 2011 at 3:02 AM, Pierre-Arnaud Marcelot <pa@marcelot.net>wrote:

> Hi Daniel,
>
> Studio's current trunk embeds the LDAP API as a replacement for JNDI (you
> can select the one you want on a connection basis).
> I've tested a Paged Search using it on an OpenLDAP 2.4.24 server and it
> worked fine.
> It showed me the required number of results and I was able to move through
> pages.
>
> Although, it didn't work on all database backends, like the "cn=config"
> database for instance.
> It appears only "bdb" and "hdb" database backends support this control. [1]
>
> Which database backend are you using for your "dc=vt,dc=edu" database  ?
>
> Regards,
> Pierre-Arnaud
>
> [1] — http://www.openldap.org/lists/openldap-software/200402/msg00508.html
>
>
> On 28 juin 2011, at 18:58, Daniel Fisher wrote:
>
> > Can anyone provide some sample code for using the paged results control?
> > This is basically what I'm doing now:
> >
> >    PagedResultsImpl prc = new PagedResultsImpl();
> >    prc.setCritical(true);
> >    prc.setSize(5);
> >
> >    SearchRequest request = new SearchRequestImpl();
> >    request.setScope(SearchScope.SUBTREE);
> >    request.setBase(new Dn("dc=vt,dc=edu"));
> >    request.setFilter("(uid=*)");
> >    request.addAllControls(new Control[] {prc, });
> >
> > OpenLDAP is reporting:
> >
> > conn=1014 op=1 SEARCH RESULT tag=101 err=2 nentries=0 text=paged results
> > control value is absent
> >
> > Thanks.
> >
> > --Daniel Fisher
>
>

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