Re: [Modeling-users] Rollback?
Status: Abandoned
Brought to you by:
sbigaret
From:
<sbi...@us...> - 2006-10-09 16:17:44
|
Sorry for the very late answer, for an unknown reason I did not see your = post. > Well, I can forbid that for the main database of my application. > =20 >> - optimistic locking: you'll get notifications when saving changes, >=20 > How does this work? I was thinking of a delegate method being called by saveChanges() when it= notices that changes have happened in the database since the last time t= he DB was queried (meaning that someone else has modified the db). The delegate will receive a full view of observed modifications: the prop= erties that have changed (attributes+relationships), objects that have be= en deleted. With this information any possible processing is possible: c= ustom fusion of local+db modifications, notifying the user of a conflict = and asking him how to solve it, ignoring changes and overriding the db ch= anges, any combination of the previous solutions... In any case, the dele= gate will decide whether the transaction opened by saveChanges() should b= e cancelled for real or re-submitted after conflicts have been solved. -- S=E9bastien. Wolfgang Keller wrote: >> But, given that pessimistic locking locks any data that is going to be= =20 >> updated, if your application is transaction-intensive updating the sam= e data,=20 >=20 >> you'll get a lot of processes waiting at the same time. >=20 > "Waiting for Godot" >=20 > Or, as users of SAP call it in German; "Sanduhr-Anzeige-Programm" -=20 > Hourglass-Display-Program. >:-> > =20 >> it won't even help if the framework had something like a central serve= r on=20 >> top of the db & shared among different processes since the data still = can=20 >> be updated directly at the database level by any other process.=20 >=20 > Well, I can forbid that for the main database of my application. > =20 >> - optimistic locking: you'll get notifications when saving changes, >=20 > How does this work? >=20 >> giving you the opportunity to examine the change and, e.g., automatica= lly=20 >> handle them or provide feedback to the user.=20 >=20 > That would be what I am looking for. >=20 > Sincerely, >=20 > Wolfgang Keller >=20 |