Package com.alibaba.druid.pool

Examples of com.alibaba.druid.pool.DruidDataSource$DestroyTask


        logField.setAccessible(true);
        statLog = (Log) logField.get(null);

        statLog.resetStat();

        dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mock:xxx");
        dataSource.setTestOnBorrow(false);
        dataSource.setConnectionProperties("a=3;b=4");
        dataSource.setFilters("stat");
        dataSource.init();
View Full Code Here


    private CallableStatementProxy statement;

    private int                    invokeCount = 0;

    protected void setUp() throws Exception {
        dataSource = new DruidDataSource();

        MockCallableStatement mockStmt = new MockCallableStatement(null, "") {

            @Override
            public Object getObject(int parameterIndex) throws SQLException {
View Full Code Here

        logField.setAccessible(true);
        dataSourceLog = (Log) logField.get(null);

        dataSourceLog.resetStat();

        dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mock:xxx");
        dataSource.setTestOnBorrow(false);
        dataSource.setConnectionProperties("druid.filters=stat;druid.stat.sql.MaxSize=234");
        dataSource.init();
View Full Code Here

    protected MockPreparedStatement        raw;
    protected DruidPooledPreparedStatement stmt;

    protected void setUp() throws Exception {
        DruidDataSource                dataSource = new DruidDataSource();
        MockConnection mockConn = new MockConnection();
        DruidConnectionHolder connHolder = new DruidConnectionHolder(dataSource, mockConn);
        DruidPooledConnection conn = new DruidPooledConnection(connHolder);

        raw = new MockPreparedStatement(null, null);
View Full Code Here

public class StatFilterResultSetMultiCloseTest extends TestCase {

    private DruidDataSource dataSource;

    protected void setUp() throws Exception {
        dataSource = new DruidDataSource();

        dataSource.setUrl("jdbc:mock:xxx");
        dataSource.setFilters("stat");
        dataSource.setPoolPreparedStatements(true);
        dataSource.setMaxOpenPreparedStatements(100);
View Full Code Here

public class PSCacheTest2 extends TestCase {

    private DruidDataSource dataSource;

    protected void setUp() throws Exception {
        dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mock:x1");
        dataSource.setPoolPreparedStatements(true);
        dataSource.setMaxOpenPreparedStatements(10);
        dataSource.setSharePreparedStatements(true);
    }
View Full Code Here

    private DruidDataSource dataSourceA;
    private DruidDataSource dataSourceB;

    protected void setUp() throws Exception {
        dataSourceA = new DruidDataSource();
        dataSourceB = new DruidDataSource();

        dataSourceA.setUrl("jdbc:mock:xxx_A");
        dataSourceB.setUrl("jdbc:mock:xxx_B");
       
        StatFilter filter = new StatFilter();
View Full Code Here

    protected void setUp() throws Exception {
        log = ((Log4jImpl) LogFactory.getLog(DruidDataSource.class)).getLog();
        oldLevel = log.getLevel();
        log.setLevel(Level.FATAL);
       
        dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mock:");
//        dataSource.setAsyncCloseConnectionEnable(true);
        dataSource.setTestOnBorrow(false);
        dataSource.setMaxActive(16);
View Full Code Here

        logField.setAccessible(true);
        dataSourceLog = (Log) logField.get(null);

        dataSourceLog.resetStat();

        dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mock:xxx");
        dataSource.setTestOnBorrow(false);
        dataSource.setFilters("stat");
        dataSource.init();
View Full Code Here

public class DruidDataSourceTest_maxActive1 extends TestCase {

    private DruidDataSource dataSource;

    protected void setUp() throws Exception {
        dataSource = new DruidDataSource();
        dataSource.setUrl("jdbc:mock:xxx");
        dataSource.setTestOnBorrow(false);
        dataSource.setFilters("stat");
        dataSource.setInitialSize(3);
        dataSource.setMaxActive(1);
View Full Code Here

TOP

Related Classes of com.alibaba.druid.pool.DruidDataSource$DestroyTask

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.