Basic Suspend and Resume Transaction Example
Basic Suspend and Resume Transaction Example
This example suspends and resumes a transaction.
CacheTransactionManager txMgr = cache.getCacheTransactionManager(); txMgr.begin(); region.put("key1", "value"); TransactionId txId = txMgr.suspend(); assert region.containsKey("key1") == false; // do other operations that should not be // part of a transaction txMgr.resume(txId); region.put("key2", "value"); txMgr.commit();