public static void doTxPutsBoth(String regionNameReplicate, String regionNamePartition)
      throws Exception {
    Region<String, Integer> regionReplicate = cache.getRegion(regionNameReplicate);
    Region<String, Integer> regionPartition = cache.getRegion(regionNamePartition);

    CacheTransactionManager txMngr = cache.getCacheTransactionManager();
    txMngr.begin();
    Integer valPart1 = regionPartition.get(KEY1);
    if (valPart1 == null) {
      valPart1 = 1500;
    } else {
      valPart1++;
    }
    regionPartition.put(KEY1, valPart1);

    Integer valPart2 = regionPartition.get(KEY2);
    if (valPart2 == null) {
      valPart2 = 2000;
    } else {
      valPart2++;
    }
    regionPartition.put(KEY2, valPart2);

    Integer valRepl1 = regionReplicate.get(KEY1);
    if (valRepl1 == null) {
      valRepl1 = 500;
    } else {
      valRepl1++;
    }
    regionReplicate.put(KEY1, valRepl1);

    Integer valRepl2 = regionReplicate.get(KEY2);
    if (valRepl2 == null) {
      valRepl2 = 1000;
    } else {
      valRepl2++;
    }
    regionReplicate.put(KEY2, valRepl2);
    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