From d04d6663301e6b5c115e4c5b942bbecc59b0dbd1 Mon Sep 17 00:00:00 2001 From: Kohei Tamura Date: Thu, 30 Jul 2026 15:37:45 +0900 Subject: [PATCH] Clarify testOnBorrow attribute Updated the description for 'testOnBorrow' attribute to clarify reconnection attempts and SQLException handling. Minor correction in the 'validationQuery' attribute description. https://bz.apache.org/bugzilla/show_bug.cgi?id=70164 --- modules/jdbc-pool/doc/jdbc-pool.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/jdbc-pool/doc/jdbc-pool.xml b/modules/jdbc-pool/doc/jdbc-pool.xml index 186165f3fb01..871c18ff5d78 100644 --- a/modules/jdbc-pool/doc/jdbc-pool.xml +++ b/modules/jdbc-pool/doc/jdbc-pool.xml @@ -275,7 +275,8 @@

(boolean) The indication of whether objects will be validated before being borrowed from the pool. - If the object fails to validate, it will be dropped from the pool, and we will attempt to borrow another. + If the object fails to validate, a reconnection is attempted using the same object. + If the reconnection also fails, the object is dropped from the pool and an SQLException is thrown. In order to have a more efficient validation, see validationInterval. Default value is false

@@ -304,7 +305,7 @@

(String) The SQL query that will be used to validate connections from this pool before returning them to the caller. - If specified, this query does not have to return any data, it just can't throw a SQLException. + If specified, this query does not have to return any data, it just can't throw an SQLException. The default value is null. If not specified, connections will be validation by the isValid() method. Example values are SELECT 1(mysql), select 1 from dual(oracle), SELECT 1(MS Sql Server)