zoukankan      html  css  js  c++  java
  • Java EE (9) -- JDBC & JTA

    Connection接口中定义了5中隔离级别常量

    Connection.TRANSACTION_NONE  --  不支持事务

    Connection.TRANSACTION_READ_UNCOMMITTED  -- 脏读(事务回滚造成别的事务读取到的数据不准确),不可重复读和幻读均可发生

    Connection.TRANSACTION_READ_COMMITTED  -- 不可重复读和幻读均可发生

    Connection.TRANSACTION_REPEATABLE_READ – 幻读发生(表一记录学生,表二记录表一统计信息。)

    Connection.TRANSACTION_SERIALIZABLE  -- 可串行化事务

    Javax.ejb.TransactionAttributeType枚举中定义的事务属性:

    TransactionAttributeType.MANDATORY

    If a client invokes the enterprise bean's method while the client is associated with a transaction context, the container invokes the enterprise bean's method in the client's transaction context.

    TransactionAttributeType.NEVER

    The client is required to call without a transaction context, otherwise an exception is thrown.

    TransactionAttributeType.NOT_SUPPORTED

    The container invokes an enterprise bean method whose transaction attribute NOT_SUPPORTED with an unspecified transaction context.

    TransactionAttributeType.REQUIRED

    If a client invokes the enterprise bean's method while the client is associated with a transaction context, the container invokes the enterprise bean's method in the client's transaction context.

    TransactionAttributeType.REQUIRES_NEW

    The container must invoke an enterprise bean method whose transaction attribute is set to REQUIRES_NEW with a new transaction context.

    TransactionAttributeType.SUPPORTS

    If the client calls with a transaction context, the container performs the same steps as described in the REQUIRED case.

  • 相关阅读:
    python 线程之 数据同步 Queue
    python 线程之threading(五)
    python 线程之 threading(四)
    python 线程之 threading(三)
    php-属性和方法的重载
    wordpress-4.7.2-zh_CN页面加载慢
    php-__autoload()
    php-_toString()方法
    php-final
    php-parent::和self::
  • 原文地址:https://www.cnblogs.com/thlzhf/p/4863488.html
Copyright © 2011-2022 走看看