Hi all,
I've been dusting off my old database book recently, and I've run into an
interesting problem in transactions -- the Lost Update. A lost update occurs in
a scenario such as the following. Assume two components A and B concurrently
perform these operations:
1 Component A reads integer X from the database. The database now contains X =
0.
2 Component B reads integer X from the database. The database now contains X =
0.
3 Component A adds 10 to its copy of X, and persists it to the database. The
database now contains X = 10.
4 Component B adds 10 to its copy of X, and persists it to the database. The
database now contains X = 10.
Thus Component A's update has been lost.
Can someone reason to me which EJB transaction isolation level(s) explicitly
protect against Lost Updates, and how it protects against them?
Thanks
-Ed
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".