/** * Used to encapsulate [de]marshalling of controls before and after lookup operations. * * @param target The Dn we are looking for * @return The found entry * @throws Exception If the lookup failed */ protected Entry doLookupOperation( Dn target ) throws Exception { // setup the op context and populate with request controls // execute lookup/getRootDSE operation LookupOperationContext lookupContext = new LookupOperationContext( session, target ); lookupContext.addRequestControls( convertControls( true, requestControls ) ); OperationManager operationManager = service.getOperationManager(); Entry serverEntry = operationManager.lookup( lookupContext ); // clear the request controls and set the response controls requestControls = EMPTY_CONTROLS; responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(), lookupContext.getResponseControls() ); return serverEntry; }
responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(), lookupContext.getResponseControls() );