[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5879) LDAPConnection doesn't always uses default constraints for referral handling

Full_Name: Maurice Smulders
Version: novell-jldap-devel-2008.03.01
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (


I created a LDAPBindHandler, and then called the read api as follows:

ldapEntry = ldapConnection.read(userCtx.toString(),searchConstraints);

No default constraints are set on the connection.

The referral handler never calls into my bindhandler. The workaround currently
is to set a default bind handler. Fix looks to be:

    private ReferralInfo getReferralConnection( String[] referrals)
                    throws LDAPReferralException

Change to:
    private ReferralInfo getReferralConnection( String[] referrals,
LDAPConstraints cons)
                    throws LDAPReferralException

And down below: 
        LDAPReferralHandler rh = defSearchCons.getReferralHandler();
        if (cons == null)
           cons = defSearchCons;
        LDAPReferralHandler rh = cons.getReferralHandler();

This should then support passed in LDAPConstraints()