0

I am using Spring Boot, MyBatis and Oracle db. I would like to implement Optimistic Locking without the use of the version field on the database but with the use of transactions.

Here's my problem: when two users open the same edit form on the client side and one of them edit the record, the other user, when try to put the update, should receive a message that the record has been changed from another user. Is it possibile to open a transaction when the form is open (maybe with a get request) and commit only when 'update' form button is clicked (put request)?

Thanks in advance.

  • The answer would be 'no'. This [answer](https://stackoverflow.com/a/4227957/1261766) might help you understand locks and transactions. – ave Mar 12 '22 at 22:43

0 Answers0