views:

47

answers:

1

I found the following link by erickson dated jan 29, 2009:

http://stackoverflow.com/questions/490288/is-dbcp-apache-commons-database-connection-pooling-still-relevant/490358#490358

"DBCP has serious flaws. I don't think it's appropriate for a production application, especially when so many drivers support pooling in their DataSource natively.

The straw that broke the camel's back, in my case, was when I found that the entire pool was locked the whole time a new connection attempt is made to the database. So, if something happens to your database that results in slow connections or timeouts, other threads are blocked when they try to return a connection to the pool—even though they are done using a database."

I was wondering if much had changed or improved with dbcp since this post. I am seeing this EXACT problem in my production system.

Does anyone have any alternatives to dbcp? I use it in a database connection framework...basically, I inherited a framework where the engineers thought it would be fun to rewrite hibernate. don't ask...it's a long and sordid tale. Anyway, I'm having these problems returning connections to the pool when the database is slow/down. Any ideas, suggestions, alternatives?

A: 

Try BoneCP: http://jolbox.com

For your case, it has release helper threads that will take care of releasing a connection slowly or whatever.

JustMe