Quote:
As I understand it, a transaction will only guarantee me that never
to persons will be able to get two identical records and perform
successful commit with them
Actually, thats the function of a lock, not a transaction. Transactions have nothing to do with pretecting data from concurrent update. A transaction will make sure that if user #1 tries to update multiple Jobs to "in work", neither wil get updated if any work done in the transaction fails.
True, some databases do not support the concept of selecting for update, but don't they all support the concept of locking? I thought they did (all the ones I've ever worked with do), but maybe I'm wrong.
So why not start a transaction, select your rows, lock them for update, set the "in work" flag, and commit the transaction.
Also, I would add with this the concept of optimistic locking or version checking. Hibernate has some built-in capabilities for versioning.