/**
* Send an error response to he consue r: it has to send a SYNC_REFRESH request first.
*/
private void sendESyncRefreshRequired( LdapSession session, SearchRequest req ) throws Exception
{
SearchResultDone searchDoneResp = req.getResultResponse();
searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.E_SYNC_REFRESH_REQUIRED );
SyncDoneValue syncDone = new SyncDoneValueDecorator(
ldapServer.getDirectoryService().getLdapCodecService() );
searchDoneResp.addControl( syncDone );
session.getIoSession().write( searchDoneResp );
}