db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Wooldridge <brett.wooldri...@gmail.com>
Subject Re: Suitable test query for Derby?
Date Fri, 13 Apr 2012 15:04:27 GMT
Alternatively, you can use a connection pool at supports the JDBC4
method, such as the one included with Bitronix JTA.  Of course, you have to
use a
transaction manager in the case of Bitronix, but that's not a bad thing.
 In theory, the
JDBC4 isValid(), if implemented correctly by the driver, should be much
less expensive
than a test query (which still has to be parsed and executed).  Derby does
the isValid() method.


On Fri, Apr 13, 2012 at 11:48 PM, Martin Lichtin <lichtin@yahoo.com> wrote:

> Hi
> Implementations of connection pooling typically use a "test query" to
> first check
> whether a connection is still valid before sending the actual query across.
> A test query looks like
>  SELECT SYSDATE FROM DUAL (eg. PostgreSQL or Oracle)
> or
>  SELECT 1 (eg. Ingres)
> What is a suitable test query for Derby? I couldn't find one off-hand.
> Thanks
> Martin

View raw message