testConnectionOnCheckout is extremely useful, but too
expensive in the current implementation. Attached is a
class (SQLConnectionTester) which allows a configurable
SQL to be run instead of checking database meta data.
Each database will need its own concrete subclass of
SQLConnectionTester which sets the sql to be run in the
constructor. For example, the class for Oracle could
set the sql to "select count(*) from dual" while the
class for Ingres could set the sql to "select count(*)
from $ingres.iitables". That query is basically free
for Oracle, and much faster for Ingres. My
implementation of statusOnException is very basic, but
Log in to post a comment.