Class GemfireTransactionManager

java.lang.Object
org.springframework.transaction.support.AbstractPlatformTransactionManager
org.springframework.data.gemfire.transaction.GemfireTransactionManager
All Implemented Interfaces:
Serializable, InitializingBean, PlatformTransactionManager, ResourceTransactionManager, TransactionManager

public class GemfireTransactionManager extends AbstractPlatformTransactionManager implements InitializingBean, ResourceTransactionManager
Local Transaction Management for Pivotal GemFire. Provides a Spring PlatformTransactionManager implementation for the Pivotal GemFire CacheTransactionManager. Binds one or multiple GemFire Regions for the specified GemFireCache to the thread, potentially allowing for one Region per GemFireCache model.

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.

By default, to prevent dirty reads, the GemFireCache is configured to return copies rather then direct references for get data access operations. As a workaround, one could use explicitly deep copy objects before making changes to them to avoid unnecessary copying on every fetch.

Author:
Costin Leau, John Blum
See Also: