adapterCPDS.setPoolPreparedStatements(dataSourceInformation.isPoolPreparedStatements());
adapterCPDS.setMaxIdle(dataSourceInformation.getMaxIdle());
PerUserPoolDataSource perUserPoolDataSource = new PerUserPoolDataSource();
perUserPoolDataSource.setConnectionPoolDataSource(adapterCPDS);
perUserPoolDataSource.setDefaultMaxActive(dataSourceInformation.getMaxActive());
perUserPoolDataSource.setDefaultMaxIdle(dataSourceInformation.getMaxIdle());
perUserPoolDataSource.setDefaultMaxWait((int) dataSourceInformation.getMaxWait());
perUserPoolDataSource.setDefaultAutoCommit(dataSourceInformation.isDefaultAutoCommit());
perUserPoolDataSource.setDefaultReadOnly(dataSourceInformation.isDefaultReadOnly());
perUserPoolDataSource.setTestOnBorrow(dataSourceInformation.isTestOnBorrow());
perUserPoolDataSource.setTestOnReturn(dataSourceInformation.isTestOnReturn());
perUserPoolDataSource.setTestWhileIdle(dataSourceInformation.isTestWhileIdle());
perUserPoolDataSource.setMinEvictableIdleTimeMillis(
(int) dataSourceInformation.getMinEvictableIdleTimeMillis());
perUserPoolDataSource.setTimeBetweenEvictionRunsMillis(
(int) dataSourceInformation.getTimeBetweenEvictionRunsMillis());
perUserPoolDataSource.setNumTestsPerEvictionRun(
dataSourceInformation.getNumTestsPerEvictionRun());
if (defaultTransactionIsolation != -1) {
perUserPoolDataSource.setDefaultTransactionIsolation(defaultTransactionIsolation);
}
String validationQuery = dataSourceInformation.getValidationQuery();
if (validationQuery != null && !"".equals(validationQuery)) {
perUserPoolDataSource.setValidationQuery(validationQuery);
}
return perUserPoolDataSource;
} else {