updateLock

updateLock(lockTarget: Object);

The updateLock method of the Object class attempts to acquire an update lock on the persistent object specified in the lockTarget parameter. An update lock can be acquired on an object whilst other processes hold shared locks on it. The purpose of the lock is to make updates to the object, although for the updates to be committed the update lock must be upgraded to an exclusive lock.

Use the useUpdateLocks method of the Process class to specify whether an update lock or an exclusive lock is implicitly acquired when an object is first updated, as shown in the following code fragment.

process.useUpdateLocks(true);

The updateLock method can be used only within transaction state. If used outside transaction state, an exception (1026 - Not in transaction state) is raised.

For details about update locks, see "Locking Objects", in Chapter 6 of the JADE Developer’s Reference.