-->
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: Locking rows between sessions
PostPosted: Mon Jun 01, 2009 9:28 pm 
Newbie

Joined: Mon Jun 01, 2009 9:21 pm
Posts: 1
I would like to find a way to lock a row so that other threads could not read from that row until it is manually unlocked. I have a multi-threaded application that sometimes has two threads modifying the same row. This happens rarely so it would be acceptable to make the second thread to access the row wait until the first is done. Is there a way to make the locking happen within NHibernate (or at the db [MSSQL]), or should I do this manually with Monitors.

Thanks


Top
 Profile  
 
 Post subject: Re: Locking rows between sessions
PostPosted: Tue Jun 02, 2009 9:05 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Have a look here:

http://nhforge.org/doc/nh/en/index.html#transactions-locking

_________________
--Wolfgang


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.