Project

General

Profile

« Previous | Next » 

Revision 5293

when looking up group membership, skip referrals that have errors
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4900

View differences:

src/edu/ucsb/nceas/metacat/AuthLdap.java
890 890

  
891 891
					// set moreReferrals to true and set the referral context
892 892
					moreReferrals = true;
893
					ctx = (DirContext) re.getReferralContext();
893
					
894
					// try following referral, skip if error
895
					boolean referralError = true;
896
					while (referralError) {
897
						try {
898
							ctx = (DirContext) re.getReferralContext();
899
							referralError = false;
900
						}
901
						catch (NamingException ne) {
902
							logMetacat.error("NamingException when getting referral contex. Skipping this referral. " + ne.getMessage());
903
							re.skipReferral();
904
							referralError = true;
905
						}
906
					}
894 907

  
895 908
				}// end inner try
896 909
			}// end for

Also available in: Unified diff