vincent.legendre wrote:
But there is some thing I can't understand. I change my configuration to set a timeout to 300, with a test period of 60, and a min-size to 1.
Then I launched my application, wait for about 10 minutes, try something ... and get an error.
After 10 minutes, the pool should be empty because the broken connection (because 300 s of timeout) should have been tested ? Does it kept the broken connection to ensure having at least one connection ? Does it create a new one ?
I don't really know the implementation of c3p0 but it might keep the minimum anyhow, or somehow you could get a stale connection because you weren't lucky enough time wise. In any case, I wouldn't worry much about checking the connection on check but I would definitely worry about checking the connection on borrowing. As for performance hit, what kind of application are we talking about? I have used this configuration in a high performance application and it works well. How many hits per second are you expecting?
Farzad-