Hi,
to avoid going on a wrong way I like to ask you, if there's a better way or
maybe my problem isn't one.
Imagine a web-application like ebay. You can bet on a product. But it's
possible, that there are many bets simultanously from different users. For
every bet there has to be a check, if the bet is high enough. Otherwise the
user gets an error-message. If i read the product-object for the first user
to check and afterwards update the product with the new price, there will be
other users, that have read the product from the database before the new
price was updated. So there will be no error message for the second user and
he will update the same product, but after the first user. So the changes
made by the first user will get lost.
I thought of a solution by locking the product row, so every following user
has to wait until update and freeing of the product. But I can't find any
hints for using this in cayenne.
Is there any other way to get around this problem?
Thanks for any help!
Michael
This archive was generated by hypermail 2.0.0 : Thu Feb 27 2003 - 07:48:36 EST