-->
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: Locking problem
PostPosted: Sun May 30, 2010 3:48 am 
Newbie

Joined: Mon Jan 11, 2010 9:46 am
Posts: 2
I'm facing a problem i think alot of people faced it.

The problem that i have a table Account and a lot of transaction done on this table update and read so i got inconsistent data problem "two transaction read the account balance the first one commit and update the balance so the second one have a wrong balance now!!"
so i need to lock the object on the transaction and any other transaction wants to acquire that object lock
and exception must be thrown.

I know that there are two ways of locking and i preferred to use pessimistic but no exception is thrown if another transaction tried to acquire that lock.


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.