Oh, and should I mention that these changes had a very nice side effect
- now all actual connections are "lazy" for all databases. So unless
you perform a query or some other operation, Cayenne will not try to
connect. I wanted to implement this long time ago (all those hours
spent to prevent modeler from starting connections when the DataNode is
created :-)).
[Note that logging still needs to be fixed - it incorrectly shows a
connection event when the DataNode is loaded, not when the actual
connection is opened much later]
Andrus
On Sunday, March 30, 2003, at 03:08 AM, Andrus Adamchik wrote:
> 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:30:44 EST