Apache Geode CHANGELOG

Turning Off JTA Transactions

You can configure regions to not participate in any JTA global transaction.

The ignore-jta region attribute is a boolean that tells the cache to ignore any in-progress JTA transactions when performing cache operations. It is primarily used for cache loaders, cache writers, and cache listeners that need to perform non-transactional operations on a region, such as caching a result set. It is set per region, so some regions can participate in JTA transactions, while others avoid participating in them. This example sets the ignore-jta region attribute in the cache.xml file.

cache.xml:

<region name="bridge_region">
   <region-attributes scope="local" ignore-jta="true" statistics-enabled="true"/> 
       <cache-writer> . . . </cache-writer>
    </region-attributes> 
</region>

API:

Using the API, you can turn off JTA transactions using RegionFactory and its method setIgnoreJTA(boolean). The current setting for a region can be fetched from a region’s RegionAttributes by using the getIgnoreJTA method.