Sorry to resurrect an old thread, but what about just defining a "no-op" query for each adapter. In Oracle, that would be, say, "select * from dual". Many Java connection pool implementations have such a thing, and execute it when a connection is assigned. If it fails, the connection is closed and reopened. If it works, it's safe to run your actual code.
Retries are scary. --Wilson On 11/14/05, Michael Schoen <[EMAIL PROTECTED]> wrote: > > If you're able to improve upon the code (and it sounds like you are), > > I'd appreciate your mods. > > I've posted my version as a patch, implementing Jeremy's approach (using > #active? and #reconnect!). I also put in an option to actually > auto-retry, though it's disabled by default. You can set > > OCI8AutoRecover.auto_retry = true > > to get that functionality. Though it may be dangerous, and it also > doesn't tie into Jeremy's nice new logging stuff (tracking success of > reconnects). > > See: > > http://dev.rubyonrails.org/ticket/428 > > _______________________________________________ > Rails-core mailing list > [email protected] > http://lists.rubyonrails.org/mailman/listinfo/rails-core > _______________________________________________ Rails-core mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-core
