2961 // check the hop limit
2962 if (hopCount > referralHopLimit) {
2963 NamingException lee =
2964 new LimitExceededException("Referral limit exceeded");
2965 lee.setRootCause(r);
2966 throw lee;
2967 }
2968 }
2969 return;
2970
2971 case LdapClient.LDAP_REFERRAL:
2972
2973 if (handleReferrals == LdapClient.LDAP_REF_IGNORE) {
2974 e = new PartialResultException(msg);
2975 break;
2976 }
2977
2978 r = new LdapReferralException(resolvedName, resolvedObj, remainName,
2979 msg, envprops, fullDN, handleReferrals, reqCtls);
2980 // only one set of URLs is present
2981 r.setReferralInfo(res.referrals.elementAt(0), false);
2982
2983 if (hopCount > 1) {
2984 r.setHopCount(hopCount);
2985 }
2986
2987 // check the hop limit
2988 if (hopCount > referralHopLimit) {
2989 NamingException lee =
2990 new LimitExceededException("Referral limit exceeded");
2991 lee.setRootCause(r);
2992 e = lee;
2993
2994 } else {
2995 e = r;
2996 }
2997 break;
2998
2999 /*
3000 * Handle SLAPD-style referrals.
3001 *
3030 msg,
3031 envprops,
3032 fullDN,
3033 handleReferrals,
3034 reqCtls);
3035
3036 if (hopCount > 1) {
3037 r.setHopCount(hopCount);
3038 }
3039 /*
3040 * %%%
3041 * SLAPD-style referrals received during name resolution
3042 * cannot be distinguished from those received during a
3043 * search operation. Since both must be handled differently
3044 * the following rule is applied:
3045 *
3046 * If 1 referral and 0 entries is received then
3047 * assume name resolution has not yet completed.
3048 */
3049 if (((res.entries == null) || (res.entries.isEmpty())) &&
3050 (res.referrals.size() == 1)) {
3051
3052 r.setReferralInfo(res.referrals, false);
3053
3054 // check the hop limit
3055 if (hopCount > referralHopLimit) {
3056 NamingException lee =
3057 new LimitExceededException("Referral limit exceeded");
3058 lee.setRootCause(r);
3059 e = lee;
3060
3061 } else {
3062 e = r;
3063 }
3064
3065 } else {
3066 r.setReferralInfo(res.referrals, true);
3067 res.refEx = r;
3068 return;
3069 }
3070 break;
|
2961 // check the hop limit
2962 if (hopCount > referralHopLimit) {
2963 NamingException lee =
2964 new LimitExceededException("Referral limit exceeded");
2965 lee.setRootCause(r);
2966 throw lee;
2967 }
2968 }
2969 return;
2970
2971 case LdapClient.LDAP_REFERRAL:
2972
2973 if (handleReferrals == LdapClient.LDAP_REF_IGNORE) {
2974 e = new PartialResultException(msg);
2975 break;
2976 }
2977
2978 r = new LdapReferralException(resolvedName, resolvedObj, remainName,
2979 msg, envprops, fullDN, handleReferrals, reqCtls);
2980 // only one set of URLs is present
2981 r.setReferralInfo(res.referrals == null ? null :
2982 res.referrals.elementAt(0), false);
2983
2984 if (hopCount > 1) {
2985 r.setHopCount(hopCount);
2986 }
2987
2988 // check the hop limit
2989 if (hopCount > referralHopLimit) {
2990 NamingException lee =
2991 new LimitExceededException("Referral limit exceeded");
2992 lee.setRootCause(r);
2993 e = lee;
2994
2995 } else {
2996 e = r;
2997 }
2998 break;
2999
3000 /*
3001 * Handle SLAPD-style referrals.
3002 *
3031 msg,
3032 envprops,
3033 fullDN,
3034 handleReferrals,
3035 reqCtls);
3036
3037 if (hopCount > 1) {
3038 r.setHopCount(hopCount);
3039 }
3040 /*
3041 * %%%
3042 * SLAPD-style referrals received during name resolution
3043 * cannot be distinguished from those received during a
3044 * search operation. Since both must be handled differently
3045 * the following rule is applied:
3046 *
3047 * If 1 referral and 0 entries is received then
3048 * assume name resolution has not yet completed.
3049 */
3050 if (((res.entries == null) || (res.entries.isEmpty())) &&
3051 ((res.referrals != null) && (res.referrals.size() == 1))) {
3052
3053 r.setReferralInfo(res.referrals, false);
3054
3055 // check the hop limit
3056 if (hopCount > referralHopLimit) {
3057 NamingException lee =
3058 new LimitExceededException("Referral limit exceeded");
3059 lee.setRootCause(r);
3060 e = lee;
3061
3062 } else {
3063 e = r;
3064 }
3065
3066 } else {
3067 r.setReferralInfo(res.referrals, true);
3068 res.refEx = r;
3069 return;
3070 }
3071 break;
|