Collection Concurrency (JAD-I-423)

Locks on persistent collections create a bottleneck that affects most production multiuser systems in some way. Minimizing contention and avoiding deadlocks is a challenge for developers. To help with these challenges, JADE now provides:

The deferred execution model is a good choice when applied to collections that are updated but not read within a database transaction. Some of the benefits of deferred execution are:

The deferred add and remove operations are not visible to the calling process until after the enclosing transaction has committed.

The ExternalCollection and JadeBytes classes do not implement any of the tryxxx methods. Attempts to call these raise exception 1068 (Feature not available in this release).

Deferred execution methods and non‑deferred execution updating methods cannot be called on the same collection within the same transaction; otherwise exception 1471 (Collection locking is incompatible with prior updates) is raised (PAR 67879).

The Process class now provides the useDeferredInverseMaintenance and overrideDeferredInverseMaintenance methods, which support enabling or disabling deferred execution for all automatic or manual/automatic inverse collection properties for the current process.

The Collection class now provides the abstract tryAdd and tryRemove conditional methods, which are implemented by the Array, DynaDictionary, ExtKeyDictionary, MemberKeyDictionary, and Set classes.

The Dictionary class now provides the abstract tryPutAtKey, tryRemoveKey, and tryRemoveKeyEntry conditional methods, which are implemented by the DynaDictionary and ExtKeyDictionary classes.

Collection types that can contain objects provide tryAddDeferred, tryPutAtKeyDeferred, tryRemoveDeferred, tryRemoveKeyDeferred, and tryRemoveKeyEntryDeferred deferred conditional methods.

Deferred Execution Common Behavior

The following behavior is common to deferred execution.

Development Environment Changes

The Update Mode group box on the extended Define References dialog in the JADE development environment provides the Deferred Execution check box. You can check or uncheck this check box only when the Automatic or Man/Auto option button is selected (that is, it is disabled when the Manual update mode is selected or the corresponding Type is not a Collection or a Collection that does not support deferred update modes).

New .NET API Methods

JADE now provides .NET API methods for conditional and deferred collections, as follows.

These are documented in the JADE .NET API JadeDotNetAPI.chm file, which is in the installed JADE documentation directory (for example, C:\Jade\JADE Docs\documentation).