Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1 [LEGACY]
-
None
-
Oracle 9i 9.2.0.5
Description
Cayenne fails to reconnect after an Oracle 9i 9.2.0.5 database reboot.
This patch appears to fix the problem by closing the PooledConnection then re-attempting PooledConnection.getConnection() once more when an SQLException is thrown during PooledConnection.getConnection() from PoolManager.getConnection().
Unfortunately, my understanding of connection pooling is basic, so I don't know if this may have unintended side-effects, but the idea seems sound.
I made the change in both places where PooledConnection.getConnection() is called from PoolManager.getConnection().
I'm not sure whether it might make more sense to rethrow the original pre-closed-connection exception if the exception happens a second time.