GenericObjectPool connectionPool =
new GenericObjectPool(null, maxActive, GenericObjectPool.WHEN_EXHAUSTED_BLOCK, 3000, maxIdle, false,
false, 60000, 5, 30000, true);
ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI, username, password);
PoolableConnectionFactory poolableConnectionFactory =
new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
PoolingDataSource dataSource = new PoolingDataSource(connectionPool);