Pessimistic locking is not working with Query API
- by Reddy
List esns=session.createQuery("from Pool e where e.status=:status "+
"order by uuid asc")
.setString("status", "AVAILABLE")
.setMaxResults(n)
.setLockMode("e", LockMode.PESSIMISTIC_WRITE)
.list();
I have the above query written,…