分类:
2010-02-28 19:32:07
In business applications an increasing number of dialogs are offered, in which data is displayed in change mode, but the likelihood that this data will be changed is not high. If data is accessed simultaneously by different users, a locking procedure must guarantee consistent data changes. Now, the lock mode O is offered, in addition to the familiar lock modes S, E and X.
An optimistic lock (mode 0) is set, if the user displays data in change mode. Optimistic locks on the same object cannot collide. If the user wants to save the (changed) data, the optimistic lock has to be converted into an exclusive lock (mode E). (This does not work, if beforehand another user has set a non-optimistic lock on the object). This procedure deletes other optimistic locks on the object.