directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Van Nhu <vannhu2...@yahoo.com>
Subject LDAP v3 Paged Results Control
Date Thu, 03 Nov 2005 01:08:56 GMT
Hi everyone,

I am trying to implement a Virtual Directory. Because
the Virtual Directory will not store any information
itself, its primary job is to split and redirect the
LDAP requests to each of the contributing data
sources, and merge the result sets when responding to
a search request, so I am leaning towards using just
MINA plus a cut down version of the LDAP Provider (as
opposed to using the full ApacheDS) to do the job.

One of the requirements is that the Virtual Directory
must support the LDAP v3 Paged Results Control (RFC
2696). But I am having problems reading this control
inside the
org.apache.ldap.server.protocol.support.SearchHandler
class.

When my LDAP client invokes the following methods on
the LDAP Context:
    ctx.setRequestControls( new Control[] {new
PagedResultsControl( pageSize ) } );
    ctx.search( … );

...I receive an empty Control[] array with this line
of code inside the SearchHandler:
    Control[] reqCtls = ( Control[] )
req.getControls().toArray( EMPTY );

Likewise, I thought that if my LDAP client sets:
    jndiEnv.put( Context.REFERRAL, "ignore");
...before connecting to the Virtual Directory with:
    ctx = new InitialLdapContext(jndiEnv, null);

Then this line inside the BindHandler:
    Control[] reqCtls = ( Control[] )
req.getControls().toArray( EMPTY );
...should return an array that contains the
com.sun.jndi.ldap.ManageReferralControl, but instead
it returns an empty array like the previous case.

I suspect that there is a bug in the ASN1
coder/decoder where the LDAP controls are not being
processed correctly, and would really appreciate if
someone could shed some light on this.

By the way, I am using ApacheDS with subversion
revision number 330381 checked out from the main
trunk.

Thanks and Regards,
Van



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Mime
View raw message