Some time back I argued that automated reconnect is close to impossible
to implement in Cayenne connection package:
http://objectstyle.org/cayenne/lists/cayenne-user/2003/01/0023.html
This is only partially true. Just figured how to restart failed
PooledConnectionImpl on Oracle (some simple refactoring, I will be
checking it in soon).
Unfortunately on other databases, calls like
"connection.prepareStatement" are local, and Exception is not thrown
immediately (even if the database is down), but only when a statement
is executed. So make it robust, theoretically we will must wrap not
only the Connection (with a ConnectionWrapper), but also all the
objects returned from it (Statements, ResultSets, etc.) I think this is
a bit over the board and I will not do it now. Maybe instead we will
eventually simply create an expiration parameter that will allow to
retire "old" connections. I think this is how many pools actually
work...
Andrus
This archive was generated by hypermail 2.0.0 : Sun Mar 30 2003 - 03:12:42 EST