Hello,
In a CGI type of web environment, user "A" wants to update a certain row of
data, so he fetches it for display in his browser. User "B" fetches the same
data shortly after user "A" fetches the data (but before user "A" updates).
User "A" updates. Then user "B" updates, resulting in user "B" overwriting
the update of user "A", but never seeing user "A" updates. This is because
in a typical web environment, the database connection is closed (OR randomly
pooled) with each http request, thus not taking advantage of oracles
"A.C.I.D." transaction qualities (if you need to ask, then you are not
qualified to answer)....
What should happen is something like ===> user "A" does a "select for
update", and then when user "B" goes to fetch the data he is informed that
the data is locked. But to do this you need to keep the session (whether
apache:session or not) bound to a single, exclusive db connection across
http requests..... or so I think....
Does anyone have any experience with this?
Keith
>Keith,
>I'm not really sure you want to do that with Oracle..., I mean maybe
there's a
>situation where that makes sense, but I can't think of one just yet. A db
>connection is a _signficant_ resource hog.., (this goes 100x for oracle),
and
>to be handing these out like candy to your users seems overboard. I'm not
>really sure the specifics of the problems that your having, but are you
using
>Apache::Session's DBI with oracle?
>> Hello,
>>
>> I have been using mod_perl for awhile now, works great.... the db
connections to my oracle >database are pooled for quick re-use by my
mod_perl app's, --which is all fine until I develope >>web applications that
need to prevent against "dirty read" situations between different user http
>>sessions (since there is no dedicated db connection used across http
requests)... (and YES, I >>know there are "schemes" that deal with this, but
they are needlessly cumbersome -when the >>oracle database should be doing
the work instead...)
>>
>> QUESTION: Is there a way to open a db connection and attached it to a
session cookie so that >>only one user session will be able to use that
connection? (so I could "select for update" in a >>user http request,
thereby locking another user http request from updating the row while the
first >>user session is reading the row)
> >
> >Please post and or email me at [EMAIL PROTECTED]
> >Thanks,
>> Keith
--