Search in sources :

Example 1 with OracleMockDriverJdbc3

use of com.alibaba.druid.test.util.OracleMockDriverJdbc3 in project druid by alibaba.

the class TestOracleWallJdbc3 method setUp.

protected void setUp() throws Exception {
    dataSource = new DruidDataSource();
    WallFilter wall = new WallFilter();
    wall.setConfig(new WallConfig());
    wall.getConfig().setWrapAllow(true);
    dataSource.setOracle(true);
    dataSource.setUrl("jdbc:mock:xxx");
    dataSource.setDriver(new OracleMockDriverJdbc3());
    dataSource.setPoolPreparedStatements(true);
    dataSource.setConnectionProperties("defaultRowPrefetch=50");
    dataSource.setFilters("stat");
    dataSource.getProxyFilters().add(wall);
    dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
Also used : OracleMockDriverJdbc3(com.alibaba.druid.test.util.OracleMockDriverJdbc3) WallFilter(com.alibaba.druid.wall.WallFilter) WallConfig(com.alibaba.druid.wall.WallConfig) DruidDataSource(com.alibaba.druid.pool.DruidDataSource)

Example 2 with OracleMockDriverJdbc3

use of com.alibaba.druid.test.util.OracleMockDriverJdbc3 in project druid by alibaba.

the class TestOracleWrap2 method setUp.

protected void setUp() throws Exception {
    dataSource = new DruidDataSource();
    dataSource.setOracle(true);
    dataSource.setUrl("jdbc:mock:xxx");
    dataSource.setDriver(new OracleMockDriverJdbc3());
    dataSource.setPoolPreparedStatements(true);
    dataSource.setConnectionProperties("defaultRowPrefetch=50");
    dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
Also used : OracleMockDriverJdbc3(com.alibaba.druid.test.util.OracleMockDriverJdbc3) DruidDataSource(com.alibaba.druid.pool.DruidDataSource)

Aggregations

DruidDataSource (com.alibaba.druid.pool.DruidDataSource)2 OracleMockDriverJdbc3 (com.alibaba.druid.test.util.OracleMockDriverJdbc3)2 WallConfig (com.alibaba.druid.wall.WallConfig)1 WallFilter (com.alibaba.druid.wall.WallFilter)1