Subject: Re: referrals/continuations and LDAPUrl (WG last call ontheJavaAPI)

From: "Steve Sonntag" <[email-masked]>
Date: Fri, 16 Mar 2001 14:28:35 -0700

Just a few additional notes.

>>>> "Kurt D. Zeilenga" <[email-masked]> 16-Mar-01 1:06:07 PM >>>
>At 12:17 PM 3/16/01 -0700, Steve Sonntag wrote:
>>Kurt,
>> 
>>In reviewing my previous statement, I realize I spoke hastily.
>>There are actually three cases here, and the current 
>>draft is adequate with respect to referrals/continuation
>>references when automatically following referrals.
>> 
>>2) When not automatically following referrals on a synchronous
>>request, if the application gets an LDAPReferralException as the
>>only result, the LDAPReferralException is a referral.  If the
>>application receives other results, then the LDAPReferralException
>>is a search reference.
>
>Consider two of many possible responses to a search request:
>        a) first response PDU is a search reference result message
>        a) first response PDU is a search result done message
>
>How does the API distinguish whether the LDAPReferralException
>is a continuation or a referral?

If the first response PDU is a search result done with
a referral status (or any other status for that matter)
then the LDAPSearchResults object method hasMoreElements will
return false - no more elements.  If the response was a
search reference, then hasMoreElements will return true,
i.e., there are more results to follow.

In either case, remember, this has no bearing on the
LDAPReferralHandler.  To make this more distinguishable,
in this case, something needs to be done with
LDAPReferralException.

>
>>In any case whether it is a referral or continuation
>>reference has no effect on the referral handlers as they are not used
>>when not following referrals.  To not follow referrals is the default
>>behavior.
>
>Assume the application wants to manually chase all referrals and
>continuations.  The application needs a means to distinguish what
>type of response PDU caused the exception otherwise it is forced
>to use the async API to accomplish this.  If that's the case,
>then the API TS should state so.
>
>>3) Automatic referral following is not allowed on an asynchronous
>>request, and the application knows if the response is a referral
>>or a search reference by the returned message type.
>> 
>>I hope this clarifies the issue.
>
>So, in this case, the API DOES distinguish between the two.

Yes, but only if not automatically following referrals.

-Steve

---

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Fri, 16 Mar 2001 15:00:56 -0800

>Just a few additional notes.

Thanks for clarification.  That wasn't at first clear.
        Kurt