javax.sql.DataSource.getConnection() locks system

Posted by Ryan Elkins on Stack Overflow See other posts from Stack Overflow or by Ryan Elkins
Published on 2010-05-07T21:11:59Z Indexed on 2010/05/07 21:18 UTC
Read the original article Hit count: 400

I'm using the Apache Commons DBCP library for connection pooling in a desktop application. I've done this before and never had a problem but the latest application has started sometimes locking up on the call to getConnection() on my DataSource. The application just hangs after that call.

I'm closing up my resources when I'm done with them. Is there any known reason why this might happen? I'm not even sure where to being troubleshooting this now that I've got it narrowed down to this method. It doesn't always hang - sometimes it happens fairly quickly, sometimes it takes a long time. Sometimes it doesn't happen at all, although lately I can get it to happen within a few minutes.

© Stack Overflow or respective owner

Related posts about apache-commons-dbcp

Related posts about commons-dbcp