Examples of JdbcTransactionManager


Examples of com.skyline.energy.dataaccess.jdbc.JdbcTransactionManager

        shouldAddCount = true;
      } else {
        con = dataSource.getConnection();
      }
    } else { // 第一次开始事务
      JdbcTransactionManager txManager = (JdbcTransactionManager) txObject.getTxManager();
      if (distribute) {// 分布式数据源,只在第一此写操作时启动事务
        if (needBeginTransaction()) {
          beginNewTransaction(dataSource, txObject);
          con = txObject.getConnectionHolder().getCurrentConnection();
          shouldAddCount = true;
        } else {// 创建独立于事务之外的connection
          con = dataSource.getConnection();
        }
      } else if (txManager.isLazyBegin()) {// 仅懒启动式事务,第一次启动事务
        beginNewTransaction(dataSource, txObject);
        con = txObject.getConnectionHolder().getCurrentConnection();
        shouldAddCount = true;
      } else {
        throw new TransactionException("not lazyBegin transaction bu no currentConnection exist");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.