Can somebody help me with pessimistic locking?
When I try to Lock (LockMode.UPGRADE) detached object for editing, in DB isn't row locked.
This is very simmilar to
http://opensource.atlassian.com/projects/hibernate/browse/HB-1194.
When I look to SelectLockingStrategy, I try to change it to do not close resultset and statement.
Then lock in DB is exist up to my transaction is commited, and it work as i expected.
But when then will be statement closed? How can this be fixed?
PS: sorry about my english
Hibernate version: 3.2.4sp1
Name and version of the database you are using: Informix Dynamic Server 10.00.UC5 (buffered logging database)
Code between sessionFactory.openSession() and session.close():
session.beginTransaction()
session.lock(skuska, LockMode.UPGRADE)
//something to do with "skuska"
session.update(skuska)
session.getTransaction().commit()
The generated SQL (show_sql=true): select id from skusky where id=? for update