53545556575859606162636465666768697071
try { UserTransaction ut = UserTransactionFactory.userTransaction(); TransactionManager tm = TransactionManagerFactory.transactionManager(); DemoParticipant p = new DemoParticipant(ut.identifier()); ut.begin(); tm.enlist(p); ut.commit(); passed = p.passed(); } catch (Exception ex) { ex.printStackTrace(); }