concurrency in taskService.claim()

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2011 10:06 AM
Hi,
Looking at the code, am i right in assuming that a task currently can be claimed by 2 users (or threads or whatever) at the same time without throwing an exception ? The last one to update the database would win, but maybe there is an ibatis mechanism in place (optimistic locking) to prevent this ?
Jorg
Looking at the code, am i right in assuming that a task currently can be claimed by 2 users (or threads or whatever) at the same time without throwing an exception ? The last one to update the database would win, but maybe there is an ibatis mechanism in place (optimistic locking) to prevent this ?
Jorg
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2011 10:17 AM
Yes, you are right. An ActivitiOptimisticLockException will be thrown and transaction will be rolled back for the one that came too late 
We're using a version-field on all entities and check is performed when updates are flushed.

We're using a version-field on all entities and check is performed when updates are flushed.
