use of org.jboss.jbossts.star.util.TxSupport in project wildfly by wildfly.
the class CoordinatorTestCase method test1PCAbort.
@Test
public void test1PCAbort() throws Exception {
TxSupport txn = new TxSupport();
String pUrl = getDeploymentUrl() + WorkRestATResource.PATH_SEGMENT;
String pid = null;
String pVal;
pid = modifyResource(txn, pUrl, pid, "p1", "v1");
pVal = getResourceProperty(txn, pUrl, pid, "p1");
Assert.assertEquals(pVal, "v1");
txn.startTx();
pid = enlistResource(txn, pUrl + "?pId=" + pid);
modifyResource(txn, pUrl, pid, "p1", "v2");
pVal = getResourceProperty(txn, pUrl, pid, "p1");
Assert.assertEquals(pVal, "v2");
txn.rollbackTx();
pVal = getResourceProperty(txn, pUrl, pid, "p1");
Assert.assertEquals(pVal, "v1");
}
Aggregations