JTA interactive flow in my words


2014年从msn space存档中重新恢复出来!

XA resource

  1. JTA impl register XAResource to TransactionManager;
  2. JTA impl distribute raw Resource binded with XAResource to client who requested it;
  3. client codes ask for resource for data access operation, at the same time, TransactionManager invoke the start() method of the XAResource;
  4. client codes finished the operation and invoke the close() method of the resource, JTA impl will make TransactonManager know this event, and TransactionManager will invoke end(Xid) method of the XAResource;
  5. if a second XAResource exists, almost same flow will repeat;
  6. when all of the XAResource finish their operations and the commit()method of TM is invoked , the TM will commit the global tx with 2pc protocal: 6.1 invoke prepare(Xid) method of each XAResource to ask for preparation before tx commi; 6.2 if all of the responses are OK, then invoke commit(Xid) method of eache XAResource;
  7. end !

easy Plus simple,hehe


>>>>>> 更多阅读 <<<<<<


「为AI疯狂」星球上,扶墙老师正在和朋友们讨论有趣的AI话题,你要不要⼀起来呀?^-^
这里

  1. 不但有及时新鲜的AI资讯和深度探讨
  2. 还分享AI工具、产品方法和商业机会
  3. 更有体系化精品付费内容等着你,加入星球(https://t.zsxq.com/0dI3ZA0sL) 即可免费领取。(加入之后一定记得看置顶消息呀!)

知识星球二维码

开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。

订阅「福报」