6.12 Locking
Within a multi user environment it is common, that more than one DTM have access to the same data set.
To synchronize DTMs which are started by several users on different workplaces FDT provides a locking
mechanism. Target for this event mechanism is that only one DTM has read/write access to the data set.
All other DTMs have read access only.
For this reason a DTM must lock it’s data set only if required and only during modification of the data.
After the instance data is saved by the Frame Application and is not further under modification the DTM
must unlock it’s data set immediately to enable concurrent access to the device data by other DTM
instances within a multiuser environment.
-
Before opening an ActiveX the DTM must try to lock the dataset. If successful all user input fields
can be enabled, in the other case user input fields must be disabled. After closing all ActiveX
controls in case of a locked datatset the DTM should request to save the dataset and unlock the
data set after Frame Application has saved the dataset.
-
Before an upload the DTM must also try to lock the dataset, after upload DTM should call
IFdtContainer::SaveRequest() and unlock dataset after Frame Application has saved dataset.
- A DTM can only unlock the dataset if no user interface with write-access is opened.
-
If a DTM locks it’s dataset after instantiation and unlocks during e.g. a IDtm::PrepareToRelease()
this DTM is not suitable for use within a multiuser environment.
|