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)?

If that's the case, it might make sense to use it anyway (via reflection)...

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