JTA interactive flow in my words
2014年从msn space存档中重新恢复出来!
XA resource
- JTA impl register XAResource to TransactionManager;
- JTA impl distribute raw Resource binded with XAResource to client who requested it;
- client codes ask for resource for data access operation, at the same time, TransactionManager invoke the start() method of the XAResource;
- 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;
- if a second XAResource exists, almost same flow will repeat;
- 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;
- end !
easy Plus simple,hehe
「为AI疯狂」星球上,扶墙老师正在和朋友们讨论有趣的AI话题,你要不要⼀起来呀?^-^
这里
- 不但有及时新鲜的AI资讯和深度探讨
- 还分享AI工具、产品方法和商业机会
- 更有体系化精品付费内容等着你,加入星球(https://t.zsxq.com/0dI3ZA0sL) 即可免费领取。(加入之后一定记得看置顶消息呀!)

存量的时代,省钱就是赚钱。
在增量的时代,省钱其实是亏钱。
避坑儿是省钱的一种形式,更是真正聪明人的选择!
弯路虽然也是路,但还是能少走就少走,背后都是高昂的试错成本。
订阅「福报」,少踩坑,少走弯路,多走一步,就是不一样的胜率!
