Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> "First Updater Wins" -- Any ways around this?
Hi All,
I have a scenario in our application where I wish to get around the
"First Updater Wins" Rule. Any ideas if this can be achieved?
Let me give a brief description of the scenario.
We have a web based application with a J2EE app server talking to an Oracle DB. The application is a normal web application.
Now we have to build a second application - which is a training
application for this web application. One of the key things required is
the capability for examiners to pose practical questions -- such as
"Create a Client by Name - John Smith" -- and the student needs to
access the web app and perform the action required by the test.
For this training app (which would use a doctored version of the first app) -- We plan to disable all commits. i.e. we would like to provide a basic version of the DB -- the student performs his actions -- plays around -- and when he logs out -- the entire session would be rolled back -- thus ensuring that the Database is in the same state (before he played with the data).
This -- No commit - but insert/update intensive app is our prime motive -- We WANT TO lose all the changes he did :) And to make matters complex -- we want to allow multiple users concurrently to be able to access the base version of the data -- completely oblivious of the existence of others.
On the initial read, we felt snapshot Isolation (Serializable Isolation level) -- would be ideal for us -- as it would act as though each transaction is working with it;s own copy of the database. -- But -- our happiness was short-lived -- as Oracle throws an error - as soon as the same row is updated in another transaction. (i,e, it does not wait till a commit) --If it had -- our scenario would work -- because we NEVER commit.
So -- is there a way to circumvent the "First Updater Wins" rule and make it work like a "First Committer wins"?
On a broader level, is there a way we can provide this in an Oracle DB -- the concept of being the only person playing with data -- oblivious of other users of the system?
Cheers
Murthy
Received on Fri Jan 12 2007 - 06:47:24 CST
![]() |
![]() |