This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 55f657299b Clarify testOnBorrow attribute
55f657299b is described below
commit 55f657299b9e441d995a2d98cdcc01a19aafd57e
Author: Kohei Tamura <[email protected]>
AuthorDate: Thu Jul 30 15:37:45 2026 +0900
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 +++--
webapps/docs/changelog.xml | 9 +++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/jdbc-pool/doc/jdbc-pool.xml b/modules/jdbc-pool/doc/jdbc-pool.xml
index 1f5c9682a6..7842fe40bb 100644
--- a/modules/jdbc-pool/doc/jdbc-pool.xml
+++ b/modules/jdbc-pool/doc/jdbc-pool.xml
@@ -275,7 +275,8 @@
<attribute name="testOnBorrow" required="false">
<p>(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 <code>SQLException</code> is thrown.
In order to have a more efficient validation, see <code>validationInterval</code>.
Default value is <code>false</code>
</p>
@@ -304,7 +305,7 @@
<attribute name="validationQuery" required="false">
<p>(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 <code>SQLException</code>.
+ If specified, this query does not have to return any data, it just can't throw an <code>SQLException</code>.
The default value is <code>null</code>.
If not specified, connections will be validation by the isValid() method.
Example values are <code>SELECT 1</code>(mysql), <code>select 1 from dual</code>(oracle), <code>SELECT 1</code>(MS Sql Server)
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f268c796d0..6b31c435f7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -271,6 +271,15 @@
</fix>
</changelog>
</subsection>
+ <subsection name="jdbc-pool">
+ <changelog>
+ <fix>
+ <bug>70164</bug>: Correct the documentation for the
+ <code>testOnBorrow</code> attribute. Pull request <pr>1033</pr> provided
+ by Kohei Tamura. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<update>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.