Revision 5292
Added by ben leinfelder over 14 years ago
src/edu/ucsb/nceas/metacat/AuthLdap.java | ||
---|---|---|
402 | 402 |
logMetacat.info("AuthLdap.getIdentifyingName - Got referral: " + e.getReferralInfo()); |
403 | 403 |
// Point to the new context from the referral |
404 | 404 |
if (moreReferrals) { |
405 |
sctx = (DirContext) e.getReferralContext(); |
|
405 |
// try following referral, skip if error |
|
406 |
boolean referralError = true; |
|
407 |
while (referralError) { |
|
408 |
try { |
|
409 |
sctx = (DirContext) e.getReferralContext(); |
|
410 |
referralError = false; |
|
411 |
} |
|
412 |
catch (NamingException ne) { |
|
413 |
logMetacat.error("NamingException when getting referral contex. Skipping this referral. " + ne.getMessage()); |
|
414 |
e.skipReferral(); |
|
415 |
referralError = true; |
|
416 |
} |
|
417 |
} |
|
406 | 418 |
} |
407 |
} |
|
419 |
}
|
|
408 | 420 |
} |
409 | 421 |
} catch (NamingException e) { |
410 | 422 |
logMetacat.error("AuthLdap.getIdentifyingName - Naming exception while getting dn: " + e); |
Also available in: Unified diff
skip referrals that have errors (connection timeout, host down, etc)
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4900