Frozen Objects

A frozen object is one that is updated rarely. In fact, when a JADE object is frozen, it cannot be updated until the volatility is changed, and you should do this only when the system is unavailable to general users. Examples of good candidates for being frozen include code tables used for interpreting abbreviations, or JADE objects that do not change after they are created (for example, commercial events or archive data).

For frozen objects, shared and reserve lock requests are ignored. There is no need for the lock to be applied, as frozen objects cannot be updated and therefore a consistent view of the data is guaranteed. In addition, a frozen object in cache is always the latest edition, avoiding the need to fetch the object from the database server node.

Update locks are not allowed on frozen objects.

Exclusive locks on frozen objects are actioned.

Special action is required in order to update an object that is currently frozen. The object must first be thawed, by changing the volatility to volatile or stable, using the JoobObject SetVolatility method described under "Specifying and Changing Object Volatility", later in this chapter.

Thaw a frozen object with caution, as other JADE sessions using the object may temporarily not know that the object has been updated, and could even be assuming that it cannot change as they have requested shared locks on the object (which will have been ignored if the object was frozen).

We recommend two techniques for changing the volatility of frozen objects. The first is to thaw and update frozen objects when you can be sure that no other JADE sessions can be using the object and that there are no copies in local caches; for example, when the system is run in single user mode or it is offline and unavailable to general users.

The second technique is to change the volatility conditionally; that is, to use methods that change the volatility of a frozen object only if the object’s class is not currently in use by another JADE session. For details, see the following section.

The following diagram shows an example of locks held when requesting locks on frozen objects obj1 and obj2.

This example illustrates that exclusive lock requests are honored for frozen objects, whereas shared lock requests are ignored.