-->
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.  [ 3 posts ] 
Author Message
 Post subject: update same row simultaneous by two threads.
PostPosted: Thu Sep 15, 2005 10:28 pm 
Newbie

Joined: Thu Sep 15, 2005 10:21 pm
Posts: 2
Location: Seoul, Korea
Hello everyBody.


I am using hibernate2.1.

i have two thread which update same row of table..

and each thread use different Session...

my problem is after one thread update the row other thread also update the row...

and after that first thread's update has gone... not applied...

i guess it means second thread rollback the first thread's data..


how can i do this?

Thx for the support..


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 15, 2005 10:52 pm 
Beginner
Beginner

Joined: Tue Aug 16, 2005 11:06 pm
Posts: 46
Second thread might have overritten first thread's change. What kind of locking strategy are you using? Have you tried version/timestamp for optimsitc lock?

_________________
Jason Li
Don't forget to rate:)


Top
 Profile  
 
 Post subject: Sorry about poor explanation.....
PostPosted: Fri Sep 16, 2005 12:18 am 
Newbie

Joined: Thu Sep 15, 2005 10:21 pm
Posts: 2
Location: Seoul, Korea
i am using osworkflow.......

one thread is a servlet and another one is run by osworkflow in the servlet..

it's PostFunction of osworkflow..

and the PostFunction send message to JMS Server...


It update when MessageListener got reply from JMS Server..


i need to send Locked Object to MessageListener if i use Mutex Lock..
i think i can use static HashMap with unique key for the servlet..
but i want better way to solve this problem..


... Sorry again..


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