filmov
tv
Spring Boot: SQL Optimistic Vs Pessimistic Locking
Показать описание
Optimistic locking is where a record is locked only when changes are committed to the database.
If any concurrent update takes place, OptimisticLockException occurs
The pessimistic locking mechanism involves locking entities on the database level. Pessimistic locking is where a record is locked while it is edited.
In this video we'll make a new spring boot project from scratch using required dependencies and achieve optimistic lock exception using 2 concurrent api calls and we'll use pessimistic lock read as well for select SQL statements.
Please like, comment, share and subscribe to my channel.
Feel free to follow me on:
Have a nice day,
Thank you.
If any concurrent update takes place, OptimisticLockException occurs
The pessimistic locking mechanism involves locking entities on the database level. Pessimistic locking is where a record is locked while it is edited.
In this video we'll make a new spring boot project from scratch using required dependencies and achieve optimistic lock exception using 2 concurrent api calls and we'll use pessimistic lock read as well for select SQL statements.
Please like, comment, share and subscribe to my channel.
Feel free to follow me on:
Have a nice day,
Thank you.