// a different exception.
if ( opContext.isReferralIgnored() )
{
directoryService.getReferralManager().unlock();
PartialResultException exception = buildPartialResultException( childDn );
throw exception;
}
else
{
// Unlock the referral manager
directoryService.getReferralManager().unlock();
ReferralException exception = buildReferralException( parentEntry, childDn );
throw exception;
}
}
}
// Now, check the destination
// Normalize the opContext DN
DN parentDn = opContext.getParent();
parentDn.normalize( directoryService.getSchemaManager().getNormalizerMapping() );
// If he parent DN is a referral, or has a referral ancestor, we have to issue a AffectMultipleDsas result
// as stated by RFC 3296 Section 5.6.2
if ( directoryService.getReferralManager().isReferral( parentDn ) ||
directoryService.getReferralManager().hasParentReferral( parentDn ) )
{
// Unlock the referral manager
directoryService.getReferralManager().unlock();
// The parent DN is a referral, we have to issue a AffectMultipleDsas result
// as stated by RFC 3296 Section 5.6.2
LdapNamingException exception = new LdapNamingException( ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
exception.setRemainingName( dn );
throw exception;
}
// Unlock the ReferralManager