On 2016-01-06 15:21, Christopher Schultz wrote:
Julian,

On 1/6/16 7:42 AM, Julian Reschke wrote:
On 2016-01-06 00:06, Christopher Schultz wrote:
Julian,

On 1/5/16 9:25 AM, Julian Reschke wrote:
Hi there,

maybe that's a stupid question, but why do we need a configurable
validationQuery when there's

    Connection.isValid(...)

<https://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#isValid%28int%29>


Because not all JREs have the Connection.isValid method available, and
the validation query is a fall-back mechanism. Connection.isValid was
added in Java 1.6, and tomcat-pool is backward compatible down to Java
1.5.

Ack.

So if it wasn't for the required 1.5 compatibility, it could be used the
default way to check the connection (still allowing an override, I assume)?

I haven't read the code, so I don't know if tomcat-jdbc will prefer
Connection.isValid over an explicit validationQuery. My wild guess is

I'm looking at the source in trunk, and it doesn't seem to call isValid() ever. Are we talking about different things?

> ...


Best regards, Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to