* Used to encapsulate [de]marshalling of controls before and after rename operations.
*/
protected void doRename( Dn oldDn, Rdn newRdn, boolean delOldRdn ) throws Exception
{
// setup the op context and populate with request controls
RenameOperationContext renameContext = new RenameOperationContext( session, oldDn, newRdn, delOldRdn );
renameContext.addRequestControls( convertControls( true, requestControls ) );
// Inject the referral handling into the operation context
injectReferralControl( renameContext );
// execute rename operation
OperationManager operationManager = service.getOperationManager();
operationManager.rename( renameContext );
// clear the request controls and set the response controls
requestControls = EMPTY_CONTROLS;
responseControls = JndiUtils.toJndiControls( getDirectoryService().getLdapCodecService(),
renameContext.getResponseControls() );
}