When an item type’s cache-mode
is set to locked
, the Oracle Commerce Platform uses read and write locks to control which threads can access and change items of that type. The exact behavior depends on how you set the isolation level for the item descriptor.
To minimize deadlocks when you use locked caching, configure item descriptors to use one of the following repository isolation levels:
Isolation Level | Description |
---|---|
| The system obtains a read lock on an item when a transaction calls |
| The system obtains a read lock on an item when a transaction first calls Unlike |
| Prevents different transactions from reading an item at the same time, whether from the same server, or from different servers. |
You set an item type’s isolation level in its <item-descriptor>
tag as in the following example:
<item-descriptor name="myItem" cache-mode="locked"> <attribute name="isolationLevel" value="readCommitted"/> ... </item-descriptor>