-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Lock for Update doesn't exist up to end of Transaction
PostPosted: Thu Jun 28, 2007 7:48 am 
Newbie

Joined: Thu Jun 28, 2007 7:10 am
Posts: 2
Location: Slovakia
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.