-->
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: Regarding row locking
PostPosted: Wed Sep 14, 2011 4:53 am 
Newbie

Joined: Wed Sep 14, 2011 4:36 am
Posts: 1
Hi
I was going through a lot of post regarding the lock mode set on the row. But didn't get any help and got confused.

Here is my First scenario

1. Thread 1 is reading a row and displaying its data
2. Thread 2 loads that row after some time and read it, copies the row content and delete it So since the entry got deleted it won't be available for display row

Problem:
We have lot of data in the database, and multi-threaded environment so the query we fire fetches 10 records at a time, and after processing is done it fires again
Sometime Thread 2 loads the same row which is going to be deleted

Here is my second scenario

1. Thread 1 is reading a row and displaying its data
2. Thread 2 retrieves the same row and update some fields , which doesn't affect the display of 1st row.

Problem:

We have lot of data in the database, and multi-threaded environent so the query we fire fetches 10 records at a time, and after processing is done it fires again
Sometime Thread 2 loads the same row where the fields has already been updated.

.


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.