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

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

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

    七段

    無論怎樣,請讓我先感謝一下國家。

    BlogJava 首頁 新隨筆 聯系 聚合 管理
      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) 評論(0)  編輯  收藏 所屬分類: Java
    主站蜘蛛池模板: 亚洲精品高清无码视频| 亚洲中久无码永久在线观看同| 久久久久亚洲Av无码专| 亚洲视频在线观看免费| 亚洲Av永久无码精品三区在线| 久久精品免费大片国产大片| 亚洲综合色婷婷七月丁香| 中国好声音第二季免费播放| 亚洲乱色熟女一区二区三区丝袜| 少妇性饥渴无码A区免费| 亚洲AV成人片色在线观看高潮| 日韩午夜理论免费TV影院| 噜噜噜亚洲色成人网站∨| 7m凹凸精品分类大全免费| 亚洲最新在线视频| 成人免费福利电影| 亚洲av成本人无码网站| 亚洲国产专区一区| 13小箩利洗澡无码视频网站免费 | 四虎成人精品国产永久免费无码| 免费国产不卡午夜福在线| 一个人免费观看日本www视频| 久久夜色精品国产亚洲| 1000部拍拍拍18勿入免费视频下载 | 亚洲国产一区二区三区青草影视| 一级做a爰片久久毛片免费看| 亚洲无线观看国产精品| 免费A级毛片无码A∨| 中文有码亚洲制服av片| 亚洲一区视频在线播放| 久久久久久AV无码免费网站下载| 亚洲人成影院77777| 亚洲人成网站在线观看青青| 一级毛片成人免费看免费不卡| 精品丝袜国产自在线拍亚洲| 免费h成人黄漫画嘿咻破解版| 国产一精品一AV一免费| 亚洲女子高潮不断爆白浆| 精品国产亚洲一区二区三区| 中文字幕无码成人免费视频| 和老外3p爽粗大免费视频|