Table of contents

Official Content

Lock Mode is a GeneXus Server Versioning Model.

First of all, each GeneXus developer creates a Knowledge Base from the same GeneXus Server instance, by performing a Create Knowledge Base from GeneXus Server operation.

After the Knowledge Base creation it's done, all objects in the local Knowledge Base will be read-only. To modify a determined object the developer must obtain the object's editing permission first: that is to say, the object's Lock. 

When all the object's modifications are made, the local object copy is committed to the GeneXus Server's Knowledge Base.

The concept behind this mode is that most times developers don't need to edit the same object at the same time. Therefore, to allow developers to edit any object, they must first obtain the object's Lock from GeneXus Server, which is only granted to one developer at a time to prevent simultaneous modifications.

Usage example

Suppose DeveloperA and DeveloperB each create working copies of the same GeneXus Server Knowledge Base. They work concurrently and modify different objects within their local copies.

DeveloperA obtains the Lock for object 'A' and DeveloperB gets the Lock for object 'B'. Both save the changes locally.

If DeveloperB attempts to get the Lock for object 'A', the GeneXus Server instance will inform that object 'A' is Locked by DeveloperA. This means that the object cannot be edited until DeveloperrA releases the Lock, either by a Commit, Revert or Release Lock operation.

Once the Lock on object 'A' has been released, DeveloperB can request the Lock and start making changes after performing a Update operation.

Note: Notice that no Merge between changes is needed because changes made to an object by different users cannot be concurrent.

Resynchronize Locks With GeneXus Server

Locks can be canceled on both server KBs and client KBs (since the Steal Lock option that can be done by any authorized user).

Therefore, the resynchronization operation is useful for a developer who wants to check which locks still keep up in the server (the valid information about the locks is in the server, not in the local KB).

So, if you have a KB connected to a server and you are working with locks, when you select Knowledge Manager > Team Development from the GeneXus main menu, the dialog will contain a tab called Locks, showing you the objects that are locked. There, you will see the Resynchronize Locks With GeneXus Server button:

Resynchronize Locks With GeneXus Server

See Also

HowTo: Work with Lock Mode in GeneXus Server
GeneXus Server - Conflicts and conflict resolution


Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant