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


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


「福强私学」来一个?

「福强私学」, 一部沉淀了个人成长、技术与架构、组织与管理以及商业上的方法与心法的百科全书。


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

订阅「福报」