how to maintain concurrency during process [message #403994] |
Tue, 19 May 2009 23:57  |
navneet_sharma
Messages: 70 Registered: September 2008 Location: New Delhi, India
|
Member |
|
|
Hi ,
I m facing a problem ,need your help.
I have a payment process which is called from various processes
this process posts payment of customers.in multi user environment I need to maintain the consistency means no two payments should be posted for the customer concurrently.
I was using 'for update' in table for customer but while posting through batch processes,table gets locked while i process in loop.
Please suggest any alternative.
Regards,
Navneet
[Updated on: Wed, 20 May 2009 00:49] by Moderator Report message to a moderator
|
|
|
|
|
Re: how to maintain concurrency during process [message #404155 is a reply to message #403994] |
Wed, 20 May 2009 11:18   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
What exactly do you mean by Quote: | in multi user environment I need to maintain the consistency means no two payments should be posted for the customer concurrently.
|
Two things won't happen at the same time - the database will always do one of them before the other one.
What situation are you trying to avoid?
|
|
|
Re: how to maintain concurrency during process [message #404156 is a reply to message #404006] |
Wed, 20 May 2009 11:19   |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Quote: | Without having your model no one can help you.
|
Not so - this sounds like the sort of problem that can be solved without a create table statement - I reckon it's either a non-problem, or something that a bit of simple locking will fix.
|
|
|
Re: how to maintain concurrency during process [message #404175 is a reply to message #404156] |
Wed, 20 May 2009 11:47  |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
JRowbottom wrote on Wed, 20 May 2009 18:19 | Quote: | Without having your model no one can help you.
|
Not so - this sounds like the sort of problem that can be solved without a create table statement - I reckon it's either a non-problem, or something that a bit of simple locking will fix.
|
The solutions are different if payments and customers are in one or two tables.
If model is in 3NF it should be in 2 tables.
Regards
Michel
|
|
|