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.