Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Which transaction isolation level can prevent lost updates?
huetter_at_grz.at (Arno Huetter) wrote:
> Hello there,
>
> I am working on a multi-tier project, using Oracle 8i. My data layer
> consists of container-managed entity java beans, which means that I
> don't have direct control over which SQL statements are being
> generated, hence I cannot force X-locks via dummy-updates, nor by
> invoking SELECT FOR UPDATE. What I can do is to set the isolation
> level for the transactions my entity beans will execute within. Which
> transaction isolation level is necessary to prevent lost updates:
>
> trans 1: trans 2:
> begin;
> begin;
> select i;
> select i;
> i = i + 1;
> i = i + 1;
> update i;
> update i;
> commit;
> commit;
>
> I know isolation level SERIALIZABLE would circumvent lost updates for
> sure. But I once read that REPEATABLE READ avoids lost updates as
> well, yet I am not sure whether that's true...
I don't think Oracle implements a REPEATABLE READ isolation level, so if the container supports it, it must (should) pass it on to Oracle as a SERIALIZABLE level. But it's really upto the container.
Xho
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service New Rate! $9.95/Month 50GBReceived on Mon Nov 25 2002 - 19:21:14 CST
![]() |
![]() |