class EcmFileParticipantService {

    @Transactional(rollbackFor = Exception.class)
    public List<AcmParticipant> setFileParticipants(Long objectId, List<AcmParticipant> participants)
            throws AcmParticipantsException
    {
        validateFileParticipants(participants);

        EcmFile file = getFileDao().find(objectId);
        setFileParticipants(file, participants);
        // modify the instance to trigger the Solr transformers
        file.setModified(new Date());
        EcmFile savedFile = getFileDao().save(file);
        // make sure the session is flushed so that the Drools rules have been run
        getFileDao().getEm().flush();

        return savedFile.getParticipants();
    }

}