注解: @GlobalTransactional 手写:
GlobalTransaction tx = GlobalTransactionContext.getCurrentOrCreate(); try { tx.begin(); tx.commit();//不能提交 }catch (Exception e){ log.error("下单失败"); try{ tx.rollback(); } catch (TransactionException ex) { log.info("回滚失败"); } }
标签:事务,log,tx,try,catch,分布式 From: https://www.cnblogs.com/jiangzishun/p/17629263.html