This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
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."
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
Joined: Jan 08, 2003
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.