use of org.apache.geode.internal.jta.UserTransactionImpl in project geode by apache.
the class ClientServerTransactionDUnitTest method doJTATx1.
private void doJTATx1(String regionName, CountDownLatch latch1, CountDownLatch latch2) {
TransactionManagerImpl tm = TransactionManagerImpl.getTransactionManager();
Region r = getClientRegion(regionName);
try {
UserTransaction utx = new UserTransactionImpl();
utx.begin();
latch1.await();
r.put(key1, "value2");
utx.commit();
fail("Do not get expected RollbackException");
} catch (Exception e) {
if (e instanceof RollbackException) {
// expected exception.
} else {
Assert.fail("Unexpected exception while doing JTA Transaction1 ", e);
}
} finally {
latch2.countDown();
}
}
Aggregations