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

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

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

    七段

    無論怎樣,請(qǐng)讓我先感謝一下國家。

    BlogJava 首頁 新隨筆 聯(lián)系 聚合 管理
      35 Posts :: 2 Stories :: 7 Comments :: 0 Trackbacks

    1 definition:

    “A transaction is a complete unit of work. It may comprise many computational tasks,which may include user interface, data retrieval, and communications. A typicaltransaction modifies shared resources.”

    2 transaction features:
    ACID (atomicity, consistency, isolation, durability)

    3 java spec
    JTA, JTS
     1interface javax.transaction.TransactionManager
     2{
     3public abstract void begin();
     4public abstract void commit();
     5public abstract int getStatus();
     6public abstract Transaction getTransaction();
     7public void resume(Transaction tobj);
     8public abstract void rollback();
     9public abstract void setRollbackOnly();
    10public abstract void setTransactionTimeout(intseconds);
    11public abstract Transaction suspend() ;
    12}

    4 Common XAResource
    JDBC 2.0:
    A JDBC driver that supports distributed transactions implements the javax.transaction.xa.XAResource interface, the javax.sql.XAConnectioninterface, and the  javax.sql.XADataSource interface.

    JMS 1.0:

    a JMS provider javax.transaction.xa.XAResource interface, the implements the javax.jms.XAConnection and the javax.jms.XASession interface.

    5 Common TransactionManager

    5.1 EJB Transaction Options:
    NotSupported
        If the method is called within a transaction, this transaction is suspended during the time of the method execution.
    Required
        If the method is called within a transaction, the method is executed in the scope of this transaction; otherwise, a new transaction is started for the execution of the method and committed before the method result is sent to the caller.
    RequiresNew
        The method will always be executed within the scope of a new transaction. The new transaction is started for the execution of the method, and committed before the method result is sent to the caller. If the method is called within a transaction, this transaction is suspended before the new one is started and resumed when the new transaction has completed.
    Mandatory
        The method should always be called within the scope of a transaction, else the container will throw the TransactionRequired exception.
    Supports
        The method is invoked within the caller transaction scope; if the caller does not have an associated transaction, the method is invoked without a transaction scope.
    Never
        The client is required to call the bean without any transaction context; if it is not the case, a java.rmi.RemoteException is thrown by the container.

    5.2 Spring transaction:
          Transaction isolation: The degree of isolation this transaction has from the work of other transactions. For example, can this transaction see uncommitted writes from other transactions? avaliable options:
    ISOLATION_DEFAULT
    ISOLATION_READ_UNCOMMITTED
    ISOLATION_READ_COMMITTED
    ISOLATION_REPEATABLE_READ
    ISOLATION_SERIALIZABLE

          Transaction propagation: Normally all code executed within a transaction scope will run in that transaction. However, there are several options specifying behavior if a transactional method is executed when a transaction context already exists: For example, simply running in the existing transaction (the most common case); or suspending the existing transaction and creating a new transaction. Spring offers the transaction propagation options familiar from EJB CMT. avaliable options:
    PROPAGATION_MANDATORY
    PROPAGATION_NESTED
    PROPAGATION_NEVER
    PROPAGATION_NOT_SUPPORTED
    PROPAGATION_REQUIRED
    PROPAGATION_REQUIRES_NEW
    PROPAGATION_SUPPORTS

          Transaction timeout: How long this transaction may run before timing out (automatically being rolled back by the underlying transaction infrastructure).
          Read-only status: A read-only transaction does not modify any data. Read-only transactions can be a useful optimization in some cases (such as when using Hibernate).


    6 transaction for web service
    Protocol specifications:
    WS-Transaction
    OASIS Business Transaction Protocol (BTP)
    Java API
    JAXTX (JSR-156)

     

    posted on 2010-04-25 16:44 sevenduan 閱讀(611) 評(píng)論(0)  編輯  收藏 所屬分類: Java
    主站蜘蛛池模板: 亚洲欧洲日产国码无码网站| 亚洲日本成本人观看| 6080午夜一级毛片免费看| 亚洲a级成人片在线观看| 免费a级毛片18以上观看精品| 美女网站在线观看视频免费的| 91亚洲一区二区在线观看不卡| 热99re久久精品精品免费| www.xxxx.com日本免费| 亚洲成无码人在线观看| 亚洲人成无码久久电影网站| 欧洲精品99毛片免费高清观看 | 亚洲国产精品xo在线观看| 日韩一品在线播放视频一品免费| 怡红院免费的全部视频| 亚洲中文字幕乱码熟女在线| 久久久久亚洲精品天堂久久久久久| 中文字幕免费在线看线人| 夜夜爽妓女8888视频免费观看| 亚洲婷婷综合色高清在线| 亚洲色大成网站www永久一区| 性做久久久久久久免费看| 毛片免费观看视频| 香蕉免费看一区二区三区| 亚洲AV无码AV男人的天堂不卡| 亚洲大尺度无码专区尤物| 永久免费bbbbbb视频| 亚洲无砖砖区免费| 国产精品偷伦视频免费观看了| 在线观看亚洲AV每日更新无码| 亚洲爆乳精品无码一区二区三区| 国产三级免费电影| 无码人妻久久一区二区三区免费丨 | 亚洲伊人久久精品| 亚洲AV无码国产精品麻豆天美| 亚洲?V无码乱码国产精品| 无码一区二区三区AV免费| 最近高清中文字幕免费| a毛片在线看片免费| 一级午夜免费视频| 色窝窝亚洲av网|