// TODO: is there a nicer solution without setting an instance variable
//final List<Forum> forumHolder = new ArrayList<Forum>();
Codepoint.codepoint(CollaborationTools.class, "pre_sync_enter");
Forum forum = CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerCallback<Forum>(){
public Forum execute() {
Codepoint.codepoint(CollaborationTools.class, "sync_enter");
//was: synchronized (CollaborationTools.class) {
Forum aforum;
Long forumKey;
Property forumKeyProperty = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM);
if (forumKeyProperty == null) {
// First call of forum, create new forum and save
aforum = fom.addAForum();
forumKey = aforum.getKey();
if (log.isDebug()) {
log.debug("created new forum in collab tools: foid::" + forumKey.longValue() + " for ores::"
+ ores.getResourceableTypeName() + "/" + ores.getResourceableId());
}
forumKeyProperty = npm.createPropertyInstance(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM, null, forumKey, null, null);