Package com.alibaba.druid.proxy.jdbc

Examples of com.alibaba.druid.proxy.jdbc.DataSourceProxy


                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource);
            if (oldDataSource == null) {
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
            }
View Full Code Here


                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource); // 多线程处理需要
            if (oldDataSource == null) {
                // 放进去的线程负责注册MBean
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
View Full Code Here

                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource);
            if (oldDataSource == null) {
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
            }
View Full Code Here

                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource);
            if (oldDataSource == null) {
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
            }
View Full Code Here

                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource);
            if (oldDataSource == null) {
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
            }
View Full Code Here

        return counter;
    }

    public JdbcSqlStat createSqlStat(StatementProxy statement, String sql) {
        DataSourceProxy dataSource = statement.getConnectionProxy().getDirectDataSource();
        JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat();

        JdbcStatContext context = JdbcStatManager.getInstance().getStatContext();
        String contextSql = context != null ? context.getSql() : null;
        if (contextSql != null && contextSql.length() > 0) {
            return dataSourceStat.createSqlStat(contextSql);
        } else {
            String dbType = this.dbType;

            if (dbType == null) {
                dbType = dataSource.getDbType();
            }

            sql = mergeSql(sql, dbType);
            return dataSourceStat.createSqlStat(sql);
        }
View Full Code Here

                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource);
            if (oldDataSource == null) {
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
            }
View Full Code Here

                for (Filter filter : config.getFilters()) {
                    filter.init(newDataSource);
                }
            }

            DataSourceProxy oldDataSource = proxyDataSources.putIfAbsent(url, newDataSource); // 多线程处理需要
            if (oldDataSource == null) {
                // 放进去的线程负责注册MBean
                if (config.isJmxOption()) {
                    JMXUtils.register("com.alibaba.druid:type=JdbcStat", JdbcStatManager.getInstance());
                }
View Full Code Here

        return counter;
    }

    public JdbcSqlStat createSqlStat(StatementProxy statement, String sql) {
        DataSourceProxy dataSource = statement.getConnectionProxy().getDirectDataSource();
        JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat();

        JdbcStatContext context = JdbcStatManager.getInstance().getStatContext();
        String contextSql = context != null ? context.getSql() : null;
        if (contextSql != null && contextSql.length() > 0) {
            return dataSourceStat.createSqlStat(contextSql);
        } else {
            String dbType = this.dbType;

            if (dbType == null) {
                dbType = dataSource.getDbType();
            }

            sql = mergeSql(sql, dbType);
            return dataSourceStat.createSqlStat(sql);
        }
View Full Code Here

        return counter;
    }

    public JdbcSqlStat createSqlStat(StatementProxy statement, String sql) {
        DataSourceProxy dataSource = statement.getConnectionProxy().getDirectDataSource();
        JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat();

        JdbcStatContext context = JdbcStatManager.getInstance().getStatContext();
        String contextSql = context != null ? context.getSql() : null;
        if (contextSql != null && contextSql.length() > 0) {
            return dataSourceStat.createSqlStat(contextSql);
        } else {
            String dbType = this.dbType;

            if (dbType == null) {
                dbType = dataSource.getDbType();
            }

            sql = mergeSql(sql, dbType);
            return dataSourceStat.createSqlStat(sql);
        }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.proxy.jdbc.DataSourceProxy

Copyright © 2018 www.massapicom. 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.