When to Use Locking

Depending on your application, locking may not be required in all cases. However it is almost always needed.

For most applications, use locking in the following cases:

With all modes, for reads.
If you want to read the latest version of a concept in one agent at the same time that another agent might create or update the same concept, mediate the reads through the same global lock that was used when creating or updating the concept. This is done using an event preprocessor and, for Cache Plus Memory, a subscription preprocessor.
With Cache Only mode, for writes.
Global locking is done using an event preprocessor.
With Concurrent RTC (even with In Memory OM or Memory Only mode), for writes.
Multiple RTCs could use the same in-memory object, therefore it needs to be protected using a lock. Use a local lock, not a global lock.
With Cache Plus Memory mode, for writes, and for subscription RTCs.
These RTCs run internally to keep the Rete networks on each agent synchronized with the cache). Locking is done using a subscription preprocessor. It uses the same locking key (string) as in the event preprocessor, if one was used.
With state modeler, for timeouts.
State modeler timeouts do not go through an event preprocessor, so locking is done a different way. This is explained in TIBCO BusinessEvents Data Modeling Developer’s Guide.