Red Hat Training
A Red Hat training course is available for Red Hat JBoss Web Server
20.2.3. Strategy: read/write
If the application needs to update data, a
read-write
cache might be appropriate. This cache strategy should never be used if serializable transaction isolation level is required. If the cache is used in a JTA environment, you must specify the property hibernate.transaction.manager_lookup_class
and naming a strategy for obtaining the JTA TransactionManager
. In other environments, you should ensure that the transaction is completed when Session.close()
or Session.disconnect()
is called. If you want to use this strategy in a cluster, you should ensure that the underlying cache implementation supports locking. The built-in cache providers do not support locking.
<class name="eg.Cat" .... > <cache usage="read-write"/> .... <set name="kittens" ... > <cache usage="read-write"/> .... </set> </class>