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


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


欢迎加入「福强私学」

跨越2190个日夜,始终坚持“实践 + 原创”打造的715125字专属知识库,囊括了(但不限于)从职场、技术、管理与商业等多个板块的内容。

  • 一个ChatGPT触达不到的地方
  • 一个带你超越AI/人工智能的地方
  • 一个与你一起成长的地方

https://afoo.me/kb.html


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

订阅「福报」