commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Green, Kay" <Kay.Gr...@McKesson.com>
Subject RE: How to tell how TestOnBorrow is set
Date Wed, 06 May 2009 15:16:04 GMT
Phil

Thanks for the reply.  I will try the suggestions

Kay Green
11000 Westmoor Circle
Westminster, CO 80021
Office: 720 239-4639
Email: kay.green@mckesson.com
 
McKesson Provider Technologies
 
"Remember Life should NOT be a journey to the grave with the intention
of arriving safely in an attractive and well preserved body, but rather
to skid in sideways, chocolate in one hand, Mojito in the other, body
thoroughly used up, totally worn out and screaming "WOO HOO what a
ride!"  
Confidentiality Notice: This email message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies of the original message.
-----Original Message-----
From: Phil Steitz [mailto:phil.steitz@gmail.com] 
Sent: Wednesday, May 06, 2009 3:34 AM
To: Commons Users List
Subject: Re: How to tell how TestOnBorrow is set

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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message