Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle concurrence control
I suggest select ... for update nowait. People say there could be nasty
performance problems with the database if you don't specify nowait.
Honestly, I don't have first-hand experience.
On the other hand, the above doesn't really solve your problem, which I think is unsolvable. When A finds that the room is bookable in the browser, he may spend a finite amount of time on that Web page before he hits the "Book the Room" button. During that time, B hits that button. So A's booking fails. There's no way to prevent this because the select statement (for update or not) runs and ends before the Web booking page is shown. Remember HTTP is stateless. When you're on a Web page that finished loading, both the HTTP connection and of course the Web server to database connection are gone.
Yong Huang
In article <386920FB.231F264A_at_rationalconcepts.com>,
"C. Ferguson" <c_ferguson_at_rationalconcepts.com> wrote:
> select .... for update
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Dec 28 1999 - 23:39:18 CST