<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Jeffrey's Sky

    Go with wind
    隨筆 - 14, 文章 - 1, 評論 - 15, 引用 - 0
    數據加載中……

    XA Datasource 與 Non-XA Datasource 區別

    An XA transaction, in the most general terms, is a "global transaction" that may span multiple resources. A non-XA transaction always involves just one resource.


    An XA transaction involves a coordinating transaction manager, with one or more databases (or other resources, like JMS) all involved in a single global transaction. Non-XA transactions have no transaction coordinator, and a single resource is doing all its transaction work itself (this is sometimes called local transactions).


    XA transactions come from the X/Open group specification on distributed, global transactions. JTA includes the X/Open XA spec, in modified form.


    Most stuff in the world is non-XA - a Servlet or EJB or plain old JDBC in a Java application talking to a single database. XA gets involved when you want to work with multiple resources - 2 or more databases, a database and a JMS connection, all of those plus maybe a JCA resource - all in a single transaction. In this scenario, you'll have an app server like Websphere or Weblogic or JBoss acting as the Transaction Manager, and your various resources (Oracle, Sybase, IBM MQ JMS, SAP, whatever) acting as transaction resources. Your code can then update/delete/publish/whatever across the many resources. When you say "commit", the results are commited across all of the resources. When you say "rollback", _everything_ is rolled back across all resources.


    The Transaction Manager coordinates all of this through a protocol called Two Phase Commit (2PC). This protocol also has to be supported by the individual resources.


    In terms of datasources, an XA datasource is a data source that can participate in an XA global transaction. A non-XA datasource generally can't participate in a global transaction (sort of - some people implement what's called a "last participant" optimization that can let you do this for exactly one non-XA item).


    For more details - see the JTA pages on java.sun.com. Look at the XAResource and Xid interfaces in JTA. See the X/Open XA Distributed Transaction specification. Do a google source on "Java JTA XA transaction".

    posted on 2010-08-27 13:39 Jeffrey Feng 閱讀(4582) 評論(2)  編輯  收藏 所屬分類: 數據庫

    評論

    # re: XA Datasource 與 Non-XA Datasource 區別[未登錄]  回復  更多評論   

    XA事務往往是包括多個數據源的全局事務,非XA是單個數據源的。
    2010-08-27 15:27 | Robin

    # re: XA Datasource 與 Non-XA Datasource 區別  回復  更多評論   

    @Robin
    Yes. Agree.
    2010-08-30 13:59 | Jeffrey Feng

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 国产亚洲一区二区三区在线观看| 亚洲狠狠成人综合网| 国产亚洲精品国产| 一级视频免费观看| 精品国产香蕉伊思人在线在线亚洲一区二区| 亚洲AV综合色区无码另类小说| 亚洲精品**中文毛片| 黄色免费网站网址| 亚洲欧洲日本在线观看| 女人18毛片免费观看| 国产青草亚洲香蕉精品久久| 免费国产在线观看不卡| 日产亚洲一区二区三区| 黄色免费在线观看网址| 亚洲综合精品网站| 亚洲欧美日韩中文高清www777 | 中文字幕一精品亚洲无线一区| 亚洲精品美女久久久久| 日本一区二区三区在线视频观看免费| **真实毛片免费观看| 亚洲色成人网站WWW永久| 亚洲成a人片在线不卡一二三区| 美女内射无套日韩免费播放| 亚洲伊人久久大香线蕉在观| 24小时免费直播在线观看| 狠狠入ady亚洲精品| 亚洲日本中文字幕天堂网| 久久免费视频99| 亚洲午夜精品久久久久久app| 国产成人无码区免费内射一片色欲| 国产免费观看a大片的网站| 免费国产草莓视频在线观看黄| 女人18毛片特级一级免费视频 | 亚洲中文字幕久久精品无码VA| 88av免费观看入口在线| 亚洲日韩精品无码专区加勒比☆ | 久久香蕉国产线看免费| 亚洲深深色噜噜狠狠网站| 亚洲国产精品丝袜在线观看| 亚洲精品免费在线观看| 亚洲av乱码一区二区三区按摩|