Add locking module: optimistic vs pessimistic locking on Hibernate 7.4.14.Final
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
A holds the lock; B asks with Timeouts.NO_WAIT
|
||||
B exception: org.hibernate.exception.LockTimeoutException
|
||||
caused by org.h2.jdbc.JdbcSQLTimeoutException
|
||||
H2 message: Timeout trying to lock table "ACCOUNT"; SQL statement:
|
||||
caused by org.h2.mvstore.MVStoreException
|
||||
|
||||
select statements B sent:
|
||||
select a1_0.id,a1_0.balance,a1_0.owner from Account a1_0 where a1_0.id=? for update nowait
|
||||
Reference in New Issue
Block a user