/** * Set the referral handling flag into the operation context using * the JNDI value stored into the environment. * * @param opCtx The operation context */ protected void injectReferralControl( OperationContext opCtx ) { if ( "ignore".equalsIgnoreCase( ( String ) env.get( Context.REFERRAL ) ) ) { opCtx.ignoreReferral(); } else if ( "throw".equalsIgnoreCase( ( String ) env.get( Context.REFERRAL ) ) ) { opCtx.throwReferral(); } else { // TODO : handle the 'follow' referral option opCtx.throwReferral(); } }