IBM BPM, V8.0.1, All platforms > Administer the IT infrastructure > Manage events

Manage locks on sequenced events

The lock manager handles event sequencing locks. You can use the esAdmin command to list, delete, or unlock any lock in the lock manager.

The lock manager supports two operations on event locks:

Requests for the same lock are put into a queue in the order in which they are received. Locks are persisted to the default IBM BPM database and data source to ensure they can be recovered in the case of a server failure.

The esAdmin command enables you to administer the active and queued locks currently in the lock manager. The following sections provide more detail on using esAdmin.

If you are using partitioned databases, run the esAdmin command once for each deployment target. In a clustered environment, you can run it on any cluster, but do not run it on the dmgr.


Listing locks

The esAdmin command can list all active and queued locks in the lock manager, or only those locks associated with a specific module, component, or method.

Use one of the following methods with esAdmin:

The command returns output that looks like the following:

Sample output from esAdmin listLocks command
Lock Id Sequence Id Owner Id Module Component Method System Message Id
7564504 2 695376 CustMod CustComp createCust A09- 427BE_5002
7564504 3 232757 CustMod CustComp createCust ADF- 053RT_5004
In the output in Table 1, the sequence ID is the order in which the lock requests are queued; the lowest number in the sequence currently holds the lock. The system message ID specifies the ID for the corresponding service integration bus message; you can use this information to correlate lock requests with the messages on the destinations.


Releasing locks

Use the esAdmin command to release a single lock, as follows:

esAdmin unlock  lockId.

lockId is the unique lock ID returned by the esAdmin listLock or esAdmin listAll command.

This command is useful when you encounter a deadlock; you can release the lock that is deadlocked and grant it to the next lock request in the queue.


Delete locks

If you need to delete one or more locks, first stop the module associated with the lock. Then, use the esAdmin command to delete the lock from the database.

For examples:

esAdmin deleteLocks  moduleName

You must restart the module in order for the destinations to resume processing event messages.

Use the esAdmin deleteLocks command with caution. All locks in the specified module are deleted from the lock manager database.

Manage events