cancel
Showing results for 
Search instead for 
Did you mean: 

concurrency in taskService.claim()

heymjo
Champ on-the-rise
Champ on-the-rise
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
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Yes, you are right. An ActivitiOptimisticLockException will be thrown and transaction will be rolled back for the one that came too late Smiley Wink
We're using a version-field on all entities and check is performed when updates are flushed.