-->
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.  [ 5 posts ] 
Author Message
 Post subject: Does hibernate support pessimistic locking
PostPosted: Tue Sep 23, 2003 5:25 pm 
Newbie

Joined: Tue Sep 23, 2003 5:19 pm
Posts: 11
Does hibernate support pessimistic locking?

When a user starts editing a record the corresponding row in the database is locked for update. Other users can still read the record but cannot edit it. The lock remains in place until the transaction is committed.

Thanks Richard


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 23, 2003 5:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Yep, check out session.load() or session.lock(). session.load has an over-loaded version which takes a LockMode argument...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 28, 2003 5:59 pm 
Newbie

Joined: Tue Sep 23, 2003 5:19 pm
Posts: 11
Doesnt look like it been implemented for MSQL Server!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 29, 2003 5:32 am 
Regular
Regular

Joined: Mon Sep 08, 2003 4:53 am
Posts: 70
Location: Germany
I think you can't lock records in MSQL-Server. The data is persistent, still after an update. There's no commit in MSQL-Server, too.
And that's not depending on Hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 29, 2003 5:36 am 
Regular
Regular

Joined: Mon Sep 08, 2003 4:53 am
Posts: 70
Location: Germany
See http://forum.hibernate.org/viewtopic.php?t=647 for more details.


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

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.