Skip to content
Snippets Groups Projects
Commit 526941ba authored by srosse's avatar srosse
Browse files

OO-3058: disable the optimistic locking by efficiency statement and replace...

OO-3058: disable the optimistic locking by efficiency statement and replace with last commit win (in all case, the last which compute it win, locking or not)
parent d7781f31
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</generator> </generator>
</id> </id>
<version name="version" access="field" column="version" type="int"/> <property name="version" access="field" column="version" type="int"/>
<property name="creationDate" column="creationdate" type="timestamp" /> <property name="creationDate" column="creationdate" type="timestamp" />
<property name="lastModified" column="lastmodified" type="timestamp" /> <property name="lastModified" column="lastmodified" type="timestamp" />
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</generator> </generator>
</id> </id>
<version name="version" access="field" column="version" type="int"/> <property name="version" access="field" column="version" type="int"/>
<property name="creationDate" column="creationdate" type="timestamp" /> <property name="creationDate" column="creationdate" type="timestamp" />
<property name="lastModified" column="lastmodified" type="timestamp" /> <property name="lastModified" column="lastmodified" type="timestamp" />
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</generator> </generator>
</id> </id>
<version name="version" access="field" column="version" type="int"/> <property name="version" access="field" column="version" type="int"/>
<property name="creationDate" column="creationdate" type="timestamp" /> <property name="creationDate" column="creationdate" type="timestamp" />
<property name="lastModified" column="lastmodified" type="timestamp" /> <property name="lastModified" column="lastmodified" type="timestamp" />
......
...@@ -39,6 +39,7 @@ import java.util.zip.ZipOutputStream; ...@@ -39,6 +39,7 @@ import java.util.zip.ZipOutputStream;
import org.apache.poi.util.IOUtils; import org.apache.poi.util.IOUtils;
import org.olat.basesecurity.BaseSecurityManager; import org.olat.basesecurity.BaseSecurityManager;
import org.olat.core.CoreSpringFactory; import org.olat.core.CoreSpringFactory;
import org.olat.core.commons.persistence.DBFactory;
import org.olat.core.gui.translator.Translator; import org.olat.core.gui.translator.Translator;
import org.olat.core.id.Identity; import org.olat.core.id.Identity;
import org.olat.core.id.OLATResourceable; import org.olat.core.id.OLATResourceable;
...@@ -504,6 +505,9 @@ public class PublishProcess { ...@@ -504,6 +505,9 @@ public class PublishProcess {
} }
} }
//commit all changes before sending an event
DBFactory.getInstance().commitAndCloseSession();
/* /*
* broadcast event * broadcast event
*/ */
......
...@@ -742,6 +742,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements ...@@ -742,6 +742,7 @@ public class CheckListCourseNode extends AbstractAccessableCourseNode implements
DBFactory.getInstance().commitAndCloseSession(); DBFactory.getInstance().commitAndCloseSession();
} }
} }
DBFactory.getInstance().commitAndCloseSession();
super.updateOnPublish(locale, course, publisher, publishEvents); super.updateOnPublish(locale, course, publisher, publishEvents);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment