{
InternalLdapResult result = req.getResultResponse().getLdapResult();
ClonedServerEntry entry = null;
boolean isReferral = false;
boolean isparentReferral = false;
ReferralManager referralManager = session.getCoreSession().getDirectoryService().getReferralManager();
reqTargetDn.normalize( session.getCoreSession().getDirectoryService().
getSchemaManager().getNormalizerMapping() );
// Check if the entry itself is a referral
referralManager.lockRead();
isReferral = referralManager.isReferral( reqTargetDn );
if ( !isReferral )
{
// Check if the entry has a parent which is a referral
isparentReferral = referralManager.hasParentReferral( reqTargetDn );
}
referralManager.unlock();
if ( !isReferral && !isparentReferral )
{
// This is not a referral and it does not have a parent which
// is a referral : standard case, just deal with the request