db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Lichtin <lich...@yahoo.com>
Subject Re: Suitable test query for Derby?
Date Sun, 15 Apr 2012 11:52:21 GMT
Thanks Brett and Knut.
Interesting you guys mention Bitronix TM.
I was dealing with Atomikos when this question of a test query came up.
Unlike Bitronix it doesn't support the JDBC4 isValid().

-------- Original Message --------
Subject: Re: Suitable test query for Derby?
From: Knut Anders Hatlen <knut.hatlen@oracle.com>
To: Derby Discussion <derby-user@db.apache.org>
Date: 4/13/2012 9:29 PM

> Martin Lichtin<lichtin@yahoo.com>  writes:
>
>> 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.
>
> VALUES 1 would be Derby's equivalent of the Ingres query. Or you could
> use isValid(), as Brett suggested. (If I remember correctly, the client
> driver actually implements isValid() by executing VALUES 1 on the
> server.)
>

Mime
View raw message