Questions tagged [optimistic-locking]

When coordinating updates from multiple database sessions, optimistic locking is a strategy that assumes all updates can complete without conflict. It does not hold locks on any records while the user is editing, but checks to see if any other edits have occurred when the user tries to commit the changes. If two sessions try to edit the same data, the second one to commit will be rejected and have to redo the change. Also see pessimistic locking.

422 questions
-1
votes
1 answer

How to retry update after OptimisticLockException in the same TX

In my program I need to be able to retry row update after the row was updated by an external transaction. Hibernate/JPA throws OptimisticLockException, which I catch. Upon retry I try to re-read the row from DB through JPQL/HQL but the select…
Philopator
  • 39
  • 4
-1
votes
2 answers

Optimistic Lock

I would like to take a doubt on the optimistic lock, Is there any way to tell to user 1 while changing a form that another user 2 already changed the same form (saved), without having to wait user 1 finish all your change and then know that the…
gustavomr
  • 69
  • 2
  • 16
1 2 3
28
29