pool.setMinIdle(minSize);
pool.setMaxWait(120000);
// create the pool object factory
PoolableConnectionFactory factory = new PoolableConnectionFactory(xacf, pool, null, null, true, true);
factory.setValidationQuery("select example_type_id from example_type limit 1");
factory.setDefaultReadOnly(false);
String transIso = jdbcElement.getAttribute("isolation-level");
if (UtilValidate.isNotEmpty(transIso)) {
if ("Serializable".equals(transIso)) {
factory.setDefaultTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
} else if ("RepeatableRead".equals(transIso)) {
factory.setDefaultTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
} else if ("ReadUncommitted".equals(transIso)) {
factory.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
} else if ("ReadCommitted".equals(transIso)) {
factory.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
} else if ("None".equals(transIso)) {
factory.setDefaultTransactionIsolation(Connection.TRANSACTION_NONE);
}
}
pool.setFactory(factory);
mds = new ManagedDataSource(pool, xacf.getTransactionRegistry());