You can remove the synchronization of the validateObject method in PoolableConnectionFactory but be carefull.
If the query is slow because the database is overloaded then allowing more validationQueries will increase the problem.


For the next release I'm thinking about monitoring SQLExceptions thrown by the connection and invalidating the connection before it is returned to the pool.
This will cover "broken" connections. Combined with a "testOnBorrowOldConnection" it can replace the current "testOnBorrow".


Dirk

Brad Johnson wrote:

Hello,

I noticed the latest commit to AbandonedObjectPool.java in the Jakarta Commons DBCP project. The changes seem to fix some thread blocking that I have observed lately on our Tomcat uPortal app.

I tried out the new nightly (9/24/03) today, and I think another point of thread contention has been exposed when using the validate connection features of DBCP. I'm worried that if the validation query takes too long/hangs then all the other threads that want a connection will be blocked until it times out. Do you think I'm on the right track?

<stacktrace removed>

----------------

Thanks,

Brad Johnson
Texas Tech University






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to