Re: Jboss/Oracle/select 1 form dual

From: Martin Busik <martin.busik_at_busik.de>
Date: Fri, 8 May 2009 11:00:07 +0200
Message-Id: <0MKuxg-1M2Lw71hvd-0000su_at_mrelayeu.kundenserver.de>


> Personally, I would shoot anyone who configures a pointless additional
> select statement to check connectivity; I blogged on
> it<http://preferisco.blogspot.com/2006/04/is-this-oracle-wtf.html>a
> couple of years ago and it has come up several times on this list. But
> that's another matter.

It may become quite hard to find the one, who is doing a "pointless additional query".

The JDBC interface contains no ping (or isAlive or similiar) method.

Connection pool implementations rely on the JDBC interface, so to check if a connection
is valid/usable, they can only execute standard conform methods, typically a "select null from dual".

Without a connection check, application users (and in the next steps admins and developers) are
bored with more or less regular errors ("The first user on monday morning gets this exception")

So, a "select null from dual" is the least evil one can choose...

SCNR,
Martin

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 08 2009 - 04:00:07 CDT

Original text of this message