aspose file tools*
The moose likes JDBC and the fly likes commons DBCP problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "commons DBCP problem" Watch "commons DBCP problem" New topic
Author

commons DBCP problem

Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
The commons DBCP doesn't work properly, the connection reuse is never done, i was trying the application with DBCP with initial connections set at 25 and when i hit the page 26th time, the page never shows up, the error cannot retrieve connection from the pool. Although my application always closes the connection after using it. I have seen a lot of people complaining about this, don't know whether they have found the solutions for it or not.

I am now using the PoolMan which is based on JDBC 2.0 and which lacks some of the methods like returning the Generated keys for which i had to synchronize the objects to get the functionality. Except this, poolman is very efficient in reusing the connections.

If anyone is using the Commons DBCP haven't you got this problem anytime, if so how to solve?.


"Failure is not when you fall down; its only when you fail to get up again."
Chris Stehno
Ranch Hand

Joined: Feb 26, 2001
Posts: 180
The first question that comes into my head is 'are you returning the connections to the pool?' I have used DBCP in numerous problems and have found it to be quite stable and reliable. There are manu configuration settings, though. You may want to take a closer look at the documentation and at how your app is using and returning connections.

Hope this helps.


- Chris Stehno, SCPJ
Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
Yes I am returning the connections, the code i write is like this.


am I doing anything wrong here.. else if u can post your code of how you are using the connections and returning them, it would be a gr8 help.

Thanks
Shankar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: commons DBCP problem