Examples of currentHolder()


Examples of net.hasor.db.datasource.local.ConnectionSequence.currentHolder()

    //
    /**获取数据库连接(线程绑定的)*/
    protected TransactionObject doGetConnection(final JdbcTransactionStatus defStatus) throws SQLException {
        LocalDataSourceHelper localHelper = (LocalDataSourceHelper) DataSourceUtils.getDataSourceHelper();
        ConnectionSequence connSeq = localHelper.getConnectionSequence(this.getDataSource());
        ConnectionHolder holder = connSeq.currentHolder();
        if (holder.isOpen() == false || holder.hasTransaction() == false) {
            defStatus.markNewConnection();/*新事物,新连接*/
        }
        holder.requested();
        //下面两行代码用于保存当前Connection的隔离级别,并且设置新的隔离级别。
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.