public static void doTxPuts(String regionName) throws Exception {
    Region<String, Integer> region = cache.getRegion(regionName);

    CacheTransactionManager txMngr = cache.getCacheTransactionManager();
    txMngr.begin();
    Integer value1 = region.get(KEY1);
    if (value1 == null) {
      value1 = 1;
    } else {
      value1++;
    }
    region.put(KEY1, value1);

    Integer value2 = region.get(KEY2);
    if (value2 == null) {
      value2 = 1000;
    } else {
      value2++;
    }
    region.put(KEY2, value2);
    txMngr.commit();
  }
This test class tests the communication pattern of a transaction for replicate and partition
region. There are five VMs that two CacheServers, CacheServer with Pool and two clients. The
communicate of a transaction is the following three patterns. In addition, this test class also
tests transactions from older version clients to check backwards compatibility.<br>
<ol>
<li>CacheServer (transaction)-> CacheServer</li>
<li>Client (transaction)-> CacheServer</li>
<li>Old version client (transaction)-> CacheServer</li>
<li>CacheServer via Pool (transaction)-> CacheServer</li>
</ol>
geode-core/src/upgradeTest/java/org/apache/geode/internal/cache/TxCommitMessageBCTestBase.java