transactionManager.begin();
transactionManager.begin();
Transaction currentTrans = transactionManager.getTransaction();
TestResource res1, res2;
currentTrans.enlistResource(res1 = new TestResource());
currentTrans.enlistResource(res2 = new TestResource());
currentTrans.delistResource(res2, XAResource.TMSUCCESS);
currentTrans.delistResource(res1, XAResource.TMSUCCESS);
transactionManager.commit();