In the cases when the user opened GDB in the shared access mode or started ObjectLand in the mode of shared access to shared library, hierarchical pane of the main window contains an additional component Sessions. It is made up of two subcomponents: GDB and Shared Library. If one of these subcomponents is selected on the hierarchical pane, in the list pane a list of all current sessions of user access to the present GDB or to the shared library is displayed (figure 4-3).
Figure 4-3. A list of sessions with GDB
A list of sessions contains four columns by default:
Station – contains network name of the computer from which the session was started for every session;
Domain – contains network domain name to which the computer belongs;
Locking – in the cases when one of the sessions installs GDB or shared library locking, in this column the type of locking is indicated.
Session – a serial number of session with the present GIS. From every computer several ObjectLand copies can be started, that is why there may be several sessions for one computer.
Organization of shared access to GDB and shared library is based on the following principle: every session locks access of other sessions to the data for the periods when it performs reading and writing data to the files.
Two types of locking are used:
Shared locking is set when the session reads data. Other sessions can also read data but cannot perform writing operations.
Exclusive locking is set when a session performs changing data (writes data into the files). Other sessions cannot get access to data in the files at all until the locking is removed.
The system keeps sequential numeration of all lockings installed by sessions of shared work with the present GDB starting from the moment of opening GDB by one of the sessions. Every subsequent locking gets a number which is greater than the number of the previous locking by one. Lockings of the shared library are numerated separately.
In the period when the session does not refer to GDB for reading or changing data, it does not receive information about changes made by other sessions. When a session should refer to GDB and sets a locking, it receives the data about all the changes in the order of number increase of the corresponding lockings. Thus, at every moment of time different sessions can work with data which differ by the number of the last fixed change. However, the system guarantees that every session fixes all GDB changes made by itself and also by other sessions in one and the same order. Fixing changes in the shared library is organized in the same way.
Information in the sessions list is updated dynamically with new startups and terminations of the sessions, setting and removing lockings. With this purpose the system regularly scans sessions. The time between scans set by default is ten seconds. Due to this, locking installed by one of the sessions will be displayed in the list only if it is active at the moment of a regular scan. In practice, in the sessions list usually only lockings connected with the execution of relatively long operations are displayed. A complex theme drawing can be an example of a long operation with shared locking. An example of a long operation with exclusive locking is transformation of map feature coordinates.
Apart from the four data columns described above which are displayed by default the user can assign displaying of columns of additional data about the sessions of shared work by using the command View+Setting columns (see “Setting the main window appearance”):
Process – indicates numeric identifier of Windows process connected with the present session in hexadecimal and decimal form.
Fixed change – indicates the number of locking connected with the last data change (performed by any session), information about which has been taken into account by the present session already.
Generated change – indicates the number of locking connected with the last data change which was performed by the present session.
User – if users list has been created for the present GDB and the current user has access to this list (see chapter 85 “Access control basics”), in this column the name of the user who started the present session is displayed.
Time of session start.
Time of session end.
Time of lock start – is displayed in the case the locking is active at the present moment.
Time of lock end – is displayed if the locking is removed at the present moment.
User working session with the shared library is completed when the user finishes to work with ObjectLand. Working session with GDB starts with opening this GDB and is completed either with the GDB closing or when ObjectLand session is finished. When a session is completed all data lockings set by this session are removed. However, it should be kept in mind that hardware failures can lead to a sudden incorrect session termination. In this case the lockings which have not been removed can remain preventing other users from normal work. To solve such problems without restarting the system, there is a special command in the main window Edit+Terminate. This command is enabled if the mode of shared access is used and one or several sessions of working with GDB or shared library have been selected in the main window pane. Execution of this command leads to forced session termination and locked data release.
User session with GDB can be stopped only by administrator of this GDB.
Using forced session termination is not recommended and should be used only in case of emergency.