if ( !psearchControl.isNotificationEnabled( ChangeType.ADD ) )
{
return;
}
SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
respEntry.setObjectName( addContext.getDn() );
// the entry needs to be cloned cause addContext.getEntry() will only contain
// the user provided values and all the operational attributes added during
// Partition.add() will be applied in the cloned entry present inside it
// if we don't clone then the attributes will not be filtered
// e.x the operational attributes will also be sent even when a user requests
// user attributes only
Entry entry = new ClonedServerEntry( addContext.getEntry() );
filterEntry( entry );
respEntry.setEntry( entry );
setECResponseControl( respEntry, addContext, ChangeType.ADD );
session.getIoSession().write( respEntry );
}