IIRC my earlier tests with Oracle showed that reconnect worked on certain
errors, but not all
(http://objectstyle.org/cayenne/faq/deploy.html#reconnect). I guess better
reconnect support may require wrapping more of JDBC classes with custom
implementations (not only the Connection).
BTW, are you using Cayenne connection pool or something like commons-dbcp?
I believe DBCP wraps things like PreparedStatements, etc., so it can do
the reconnect in more deeply nested cases.
Andrus
> Is there any support in Cayennne for reconnecting after a database is
> restarted?
>
> I know it was a pain to do this with Oracle 8i under EOF, and it doesn't
> seem to be working for Oracle 9i under Cayenne, either.
>
> Here's an example stack-trace I get.
>
> Error: org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1-dev April
> 14 2004] Global exception.
> at
> org.objectstyle.cayenne.access.util.SelectObserver.nextGlobalException(SelectObserver.java:214)
> at
> org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:307)
> at
> org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:662)
> at
> org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1359)
> at
> org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:176)
> at
> org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1282)
> at
> org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1248)
This archive was generated by hypermail 2.0.0 : Mon Jul 05 2004 - 12:16:51 EDT