Skip to main content

What is the difference between soft locking and document locking (sometimes called hard locking) in Lotus Notes®, and when are these locking features are enabled?

Document Locking:
In Notes/Domino 6.x, a database property feature called "Allow document locking" was introduced. When this property is enabled, any user with Author access or above can lock a document across all replicas. This prevents two or more users from making changes to the same document and then replicating - which would create replication conflict documents.
To enable this feature, you can select the database property "Allow document locking" in the basics tab.
Soft Locking:
Soft locking was also a new feature in Notes/Domino 6, but it was not documented as clearly as document locking. Soft locks are in-memory locks that are enabled when documents are in memory, and are not persistent. The editor takes out a soft lock on a document when it is opened in edit mode, and then unlocks it when the document is closed. During the period of time when it is soft locked, no one else can edit that document but it only affects the current replica where the user is working; it does not affect other replicas of the database.
Prior to release 6.5.1, soft locks could not be disabled. Beginning in releases 6.0.4, 6.5.1, and 7.0, users can add a NOTES.INI parameter EDIT_NO_SOFT_LOCKS=1 to their client's notes.ini.
The EDIT_NO_SOFT_LOCKS=1 ini parameter was added as a workaround for customers who had applications that did not work well with soft locking. The parameter essentially reverts locking behavior back to the R5 style, where soft locking did not exist. This parameter disables all soft locking in all databases accessed by that client. It cannot be enabled on a database by database basis.
At this time, there is no other way to disable soft locking. This parameter can be set programmatically in all clients via LotusScript with the following instructions:

    Dim session As New NotesSession
    Call session.SetEnvironmentVar( "EDIT_NO_SOFT_LOCKS", "1" , True)

The above script can be included in a Hotspot button included in a mail to all users.
An enhancement request, for soft locking be an option that can be enabled or disabled via a database property like document locking, has been submitted to Quality Engineering as SPR# JGON5WQLMA. There are no current plans to address this request.

Comments

Popular posts from this blog

"Error in Agent" or "Error loading USE or USELSX" running Out-of-Office agent after upgrading to Domino 6.x

Question After upgrading from one Lotus® Domino® server version to another (for example, 5.0.11 to 6.x), you find that the Out of Office agent does not work and produces errors written to the console and the log (if enabled). The error message in the Domino console is as follows: "Error in Agent ´OutOfOffice OutOfOffice´ calling script library ´Common´: Script library signer ´CN=ServerA/O=Widgets´ does not have proper rights Agent ´OutOfOffice OutOfOffice´ error: Error loading USE or USELSX module: Common AMgr: Agent ´outofoffice´ in ´mail\jdoe.nsf´ completed execution" Maintenance on the database did not resolve the problem, nor did replacing the design or running fixup, updall -r, or compact. Answer Agent security rights in Domino 6.0 were revised to be more robust. This issue occurs when the signer of the script library does not have the correct rights to execute on the Domino server, and/or the script library has not been signed in Notes/Domino 6...

Dynamically changing the combo box values in Javascript:(Lotus Notes)

I need to change the 2nd combobox value depend on the value of the first combobox value. Steps: 1) Create a combo box name it as "cmbValue" . And have some values. 2) Give  default value to that combobox. 3) In the Onchange of that combo box place the code below. 4) Create another combobox value and name it as "cmbValue1" . 5) Give default value to that combobox also. Sample Code(Modify according to your values):   var doc = document.forms[0].cmbValue; var doc1 = document.forms[0].cmbValue1; if(doc.options[doc.selectedIndex].text=="--Select--") { doc1.remove(0) doc1.options[0] = new Option("--Select--","cmbValue1") return false; } else { if(doc.options[doc.selectedIndex].text=="One") {     doc1.options[0] = new Option("four","cmbValue1")     doc1.options[1] = new Option("five","cmbValue1")     return false; } else if(doc.options[doc.selectedIndex].text=="Two") {     doc1.opt...

Lotusscript to establish ODBC connection:

The script, when executed from a button, will create a new record in a specified ODBC data source, attempt to save the new record and display a message indicating whether the operation was completed successfully. If the operation is not completed sucessfully, it is likely that either your data source is read-only or your ODBC driver does not permit updates to the data source. Important: Complete each of the four steps below before running the script. 1. Create a new agent and add the following UseLSX command to the Options event: UseLSX "*LSXODBC" 2. Add the following script to the Initialize event of the agent. NOTE: Do not add the 'Sub' and 'End Sub' lines. Dim ui As New NotesUIWorkspace     Dim uidoc As NotesUIDocument     Dim doc As NotesDocument     Dim connection As ODBCConnection     Dim query As ODBCQuery     Dim result As ODBCResultSet         Set uidoc=ui.CurrentDocument ...