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 ?
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.