use of com.taobao.datasource.resource.adapter.jdbc.local.LocalTxDataSource in project druid by alibaba.
the class Case4 method test_jobss.
public void test_jobss() throws Exception {
LocalTxDataSourceDO dataSourceDO = new LocalTxDataSourceDO();
dataSourceDO.setBlockingTimeoutMillis(1000 * 60);
dataSourceDO.setMaxPoolSize(maxPoolSize);
dataSourceDO.setMinPoolSize(minPoolSize);
dataSourceDO.setDriverClass(driverClass);
dataSourceDO.setConnectionURL(jdbcUrl);
dataSourceDO.setUserName(user);
dataSourceDO.setPassword(password);
LocalTxDataSource tx = TaobaoDataSourceFactory.createLocalTxDataSource(dataSourceDO);
DataSource dataSource = tx.getDatasource();
for (int i = 0; i < loopCount; ++i) {
p0(dataSource, "jboss-datasource", threadCount);
}
System.out.println();
}
use of com.taobao.datasource.resource.adapter.jdbc.local.LocalTxDataSource in project druid by alibaba.
the class Case1 method test_jobss.
public void test_jobss() throws Exception {
LocalTxDataSourceDO dataSourceDO = new LocalTxDataSourceDO();
dataSourceDO.setBlockingTimeoutMillis(1000 * 60);
dataSourceDO.setMaxPoolSize(maxPoolSize);
dataSourceDO.setMinPoolSize(minPoolSize);
dataSourceDO.setDriverClass(driverClass);
dataSourceDO.setConnectionURL(jdbcUrl);
dataSourceDO.setUserName(user);
dataSourceDO.setPassword(password);
LocalTxDataSource tx = TaobaoDataSourceFactory.createLocalTxDataSource(dataSourceDO);
DataSource dataSource = tx.getDatasource();
for (int i = 0; i < loopCount; ++i) {
p0(dataSource, "jboss-datasource", threadCount);
}
System.out.println();
}
Aggregations