BoneCP does not supply a valid connection if it was created when the database was down
-
17-05-2021 - |
Question
I have a use case where the database (sybase) may be unavailable when bonecp (0.7.1.RELEASE) creates a connection pool. When it is later available however, if my app requests a connection the call never returns.
I'm using out of the box config bonecp defaults, but I've tested this with transactionRecoveryEnabled set to true too.
Considering that c3p0 and dbcp both have this functionality, is there something I'm doing wrong?
Solution
Try using lazyInit config setting, it's meant for that feature.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow