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.  [ 2 posts ] 
Author Message
 Post subject: REPEATABLE READ
PostPosted: Tue Jun 12, 2007 3:27 pm 
Newbie

Joined: Tue Jan 17, 2006 8:33 pm
Posts: 4
Looking for a way to obtain a REPEATABLE READ lock on a given NH instance on MS SQL. This can be accomplished with a special table hint on MS SQL. I would hope that LockMode would have this, but it doesn't seem to.

The basic idea is the record is locked for writers, but not for other readers.


Top
 Profile  
 
 Post subject: Re: REPEATABLE READ
PostPosted: Wed Jun 13, 2007 8:51 am 
Senior
Senior

Joined: Thu Feb 09, 2006 1:30 pm
Posts: 172
wasabi wrote:
Looking for a way to obtain a REPEATABLE READ lock on a given NH instance on MS SQL. This can be accomplished with a special table hint on MS SQL. I would hope that LockMode would have this, but it doesn't seem to.

The basic idea is the record is locked for writers, but not for other readers.


use

Code:
ISession.BeginTransaction(System.Data.IsolationLevel.RepeatableRead)


Everything within that transaction will then use REPEATABLE READ just like you wanted. I hope that helps and you aren't just trying to use that isolation level on only one table.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.