Domanda

C3p0 cache has acquireRetryDelay parameter to set time between acquire attempts.
Has tomcat7 jdbc-pool the same functionality?

È stato utile?

Soluzione

No, tomcat jdbc pool does not automatically try to connect again, when the attempt to create a connection fails. It simply will throw the exception it got as an SQLException (if it was not one in the first place). If it's you code which needs to do retry you can do it yourself, by trying to get connection several times. Or you might be able to make a patch, it does not seem to be so hard to do. You can try to use some different libraries, they say BoneCP is quite good (although I never tried that).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top