jboss的JTA事物
PlatformTransactionManager platformTransactionManager = (PlatformTransactionManager) SpringUtils.getBean("myTransactionManager");
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
TransactionStatus status = platformTransactionManager.getTransaction(def);
try {
//自己的业务代码
platformTransactionManager.commit(status);
}catch{
e.printStackTrace();
try {
platformTransactionManager.rollback(status);
} catch (Exception ex) {
ex.printStackTrace();
}
}