@Override
public void setProjectState(final Project project, final String state) {
final Long projectBrokerId = project.getProjectBroker().getKey();
OLATResourceable projectBrokerOres = OresHelper.createOLATResourceableInstance(this.getClass(),projectBrokerId);
CoordinatorManager.getCoordinator().getSyncer().doInSync( projectBrokerOres, new SyncerExecutor() {
public void execute() {
// For cluster-safe : reload project object here another node might have changed this in the meantime
Project reloadedProject = (Project) DBFactory.getInstance().loadObject(project, true);
reloadedProject.setState(state);
DBFactory.getInstance().updateObject(reloadedProject);