This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 88f694c8846d6a627468907360591b6868952fc7 Author: opencode <[email protected]> AuthorDate: Thu Nov 5 12:17:02 2026 +0100 Clarify ConnectionPool queue and parameter docs Replace the historical blocking-queue TODO on the busy field with the actual bound on its membership, describe the retained notUsed parameter as an API compatibility placeholder, and drop two comments that only restated the adjacent code. No behavior change. --- .../src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java index 39cb7c7bd7..55bb677831 100644 --- a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java +++ b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java @@ -113,8 +113,8 @@ public class ConnectionPool { private PoolConfiguration poolProperties; /** - * Contains all the connections that are in use TODO - this shouldn't be a blocking queue, simply a list to hold our - * objects + * Contains all the connections that are in use. Unbounded: membership is bounded by the maxActive/size + * bookkeeping, not by the queue capacity. */ private BlockingQueue<PooledConnection> busy; @@ -1629,7 +1629,7 @@ public class ConnectionPool { /** * Creates a JDBC connection and tries to connect to the database. * - * @param notUsed Argument not used + * @param notUsed Not used; retained for API compatibility * @param username The user name to use for the connection * @param password The password for the connection * @@ -1656,7 +1656,6 @@ public class ConnectionPool { } boolean error = false; try { - // Connect and validate the connection con.lock(); con.connect(); if (isClosed()) { @@ -1714,7 +1713,6 @@ public class ConnectionPool { throw ex; } } finally { - // con can never be null here if (error) { release(con); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
