This local strategy is an alternative to executing cache operations within JTA transactions. Its advantage is that is able to work in any environment, for example a stand-alone application or a test suite. It is not able to provide XA transactions, for example to share transactions with data access.
To prevent dirty reads, by default, the cache is configured to return copies rather then direct references for get
operations. As a workaround, one could use explicitly deep copy objects before making changes to them to avoid unnecessary copying on every fetch.
@see com.gemstone.gemfire.cache.CacheTransactionManager
@see com.gemstone.gemfire.cache.Cache#setCopyOnRead(boolean)
@see com.gemstone.gemfire.cache.Region#get(Object)
@see com.gemstone.gemfire.CopyHelper#copy(Object)
@see #setCopyOnRead(boolean)
@see org.springframework.transaction.support.AbstractPlatformTransactionManager
@author Costin Leau
|
|