Sample Header Ad - 728x90

Does H2 Database support pessimistic locking?

2 votes
0 answers
1036 views
Does the H2 Database support pessimistic locking? If so, how does its use interact with H2’s MVCC implementation? I'm not looking for advice on whether or not to use pessimistic locking. I have a specific need to emulate the behavior of another database that defaults to row-level pessimistic locking. I need to be able to test if a row is locked, and if not locked, lock it out from writes by any other database connection.
Asked by Basil Bourque (11188 rep)
Feb 2, 2017, 03:15 AM