6 1 1 Object Locking Concepts

Visual LANSA Admins

6.1.1 Object Locking Concepts

There are 3 levels of Object Locking implemented by the Visual LANSA development environment:

  • System-wide locks across all installations of LANSA that are connected together. For example, the IBM i Master and all the Slave systems that are connected to it.
  • Database-wide locks across all installations of LANSA logged in to a single instance of a database.
  • Workstation-wide locks on a single installation of LANSA on a single database. These locks do not effect developers who share the same database. They control a specific developer's use of a specific database.

Note: For indirect methods of modifying this behaviour in LANSA, refer to Special Authorities and Task Tracking.

Also note that the use of Specialised BIFs and the ROM interface count as another instance of Visual LANSA.

All these locks are automatically applied when the developer performs a specific action. For example, the developer attempts to edit a Form on a Slave system. Under the covers, Visual LANSA will obtain a System-wide lock on the Form to ensure that no other workstation has it locked and that it is locked to the current Task Id. A Database-wide Lock will also be obtained to ensure that only one developer on the current database is editing it at this moment.

The following is what occurs when it's a Slave system. There is a section at the end of this topic on differences with Independent Systems.

System-wide Locks

A System-wide Lock consists of a Task ID and a Workstation. Users may share the right to use a Task Id, but the Workstation must be unique. When an object is created or is checked out for update from the Master, the Task Id and Workstation are assigned to the object. Refer to 6.1.2 Task Tracking Concepts and Unlock Objects in Task Tracking for more information on Task Id.

The Workstation is the principal means of ensuring that a single developer anywhere in the System is the only one who may modify an object. The Workstation is assigned when creating the object or when checking it out for update. The Workstation is removed when checking the object into the Master (Keep Locks is unchecked) or when specifically unlocking the object either in Visual LANSA or on the IBM i Master under Work With Tasks.

The use of System-wide Locks cannot be changed. There are no direct options in Visual LANSA to alter this behaviour.

Database-wide Locks

Database-wide Locks ensure the single update of the whole or some part of a particular database. The Workstation is also used to control this type of lock. Examples of Database-wide Locks are:

  • Nobody else may use the database during System Initialisation
  • Nobody else may use the Partition during Partition Initialisation
  • Only one developer in one instance of Visual LANSA may update an object at a time. Even the same developer running a second instance of Visual LANSA will be locked out.

Database-wide Locks can be switched off. Refer to Object Locking for details.

Workstation-wide Locks

Workstation-wide Locks help a developer by ensuring that they do not hinder themselves. The lock is specific to a Workstation plus the Windows Process Identifier. For example:

  • If two instances of Visual LANSA are being used by the developer, only one compile will be allowed at a time

Workstation-wide Locks can be switched off. Refer to Object Locking for details.

Independent System Differences

The System-wide Lock is not based on the Workstation. It's only the Task Id.

A single user, independent, workstation may choose to switch off Object locking, but be aware that the protections offered by Database-wide Locks and Workstation-wide Locks listed above will not be available.
The default for such as system is to set Object Locking to Off.

Also See

Object Locking

Workstation Locks

Ý 6.1 Change Management Concepts