-->
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: Atomic operations
PostPosted: Wed Apr 28, 2010 8:49 am 
Newbie

Joined: Wed Sep 09, 2009 4:15 am
Posts: 14
Hello,
I have a problem with Hibernate with Oracle.
I must create an atomic operation of SELECT + UPDATE for a unique field increment (i can not use Oracle sequence because i have some do some check in this field). So i would like to know if I can create an atonic operation for prevent other selects of other transactions before the update. In my application I have two servers so i can not use the hibernate lock.

Thanks.


Top
 Profile  
 
 Post subject: Re: Atomic operations
PostPosted: Wed Apr 28, 2010 9:34 am 
Regular
Regular

Joined: Thu May 07, 2009 5:56 am
Posts: 94
Location: Toulouse, France
use SELECT ... FOR UPDATE in this case

_________________
everything should be made as simple as possible, but not simpler (AE)


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.