-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Dec 9, 2005, at 8:18 AM, Wilson Bilkovich wrote:
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.
This is how the feature's implemented: see the active? instance
methods implemented by the various connection adapters. Currently,
active? is called per-request. It'd be nice to cut that down, but
it'd be at the expense of failed requests.
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
iD8DBQFDme2OAQHALep9HFYRAqNMAJ9KAaPPPr6x0hM0vvDVYfVp9dsMTwCfaxxD
0vHt66epOb4Hfua1M1OHvaY=
=HChh
-----END PGP SIGNATURE-----
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core