Green, Kay wrote:
I am trying tell what testOnBorrow is set to for my GenericObjectPool.
Here is how I am constructing my GenericObjectPool
ObjectPool connectionPool =
new GenericObjectPool(
null,
8, // maxActive
GenericObjectPool.WHEN_EXHAUSTED_GROW, //
whenExhaustedAction
GenericObjectPool.DEFAULT_MAX_WAIT, //maxWait
true, //testOnBorrow
true); // testOnReturn
but ObjectPool does not have getTestOnBorrow.
I am creating ObjectPool object because PoolingDataSource needs
ObjectPool in its connection
Any help would be appreciated on how to tell what the parameters are set
to.
The constructor call above sets the parameters. To verify, you could
cast connectionPool back to GenericObjectPool
((GenericObjectPool) connectionPool).getXxx()
What I am trying to do is create a database connection pool.
Unless you need the control provided by the "manual" setup, it might be
easier to just use BasicDataSource, which exposes the configuration
properties.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]