On 07/11/2013 16:03, Christopher Schultz wrote:
> Yogesh,
>
> On 11/7/13, 10:58 AM, yogesh hingmire wrote:
>> While looking to upgrade to tomcat7, i understand the connection
>> pool is a major improvement. I read that
>
>> commons-dbcp is single threaded, in order to be thread safe
>> commons-dbcp locks the entire pool, even during query
>> validation.
>
>> So as i understand, the connection pool will be locked when
>> handing out new connections and other threads which need
>> connections from the pool will wait until they are handed their
>> respective connection?
>
>> Is my understanding right and if anyone could explain this
>> better
>
> That is correct. This is because the checkout method is
> implemented like this (ignore syntax issues, this is psuedocode,
> won't match method signatures, etc.):
>
> public synchronized Connection checkout() { // obtain connection by
> whatever means necessary, // validate the connection, etc. }
Huh?
Have you even looked at the source for Commons Pool at any point in
the last 4 years? (Commons Pool being the component that provides the
object pooling used by Commons DBCP).
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]