This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push: new 6afd1bd Always close the connection when an uncaught NamingException occurs 6afd1bd is described below commit 6afd1bdcc14fc88dc00a53fbcfbcec2e443cef5b Author: remm <r...@apache.org> AuthorDate: Wed Jun 30 14:57:40 2021 +0200 Always close the connection when an uncaught NamingException occurs 65411: Avoids possible connection locking. And this is safer anyway. Submitted by Ole Ostergaard. --- java/org/apache/catalina/realm/JNDIRealm.java | 4 ++++ webapps/docs/changelog.xml | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java index 89564ea..7f71dbd 100644 --- a/java/org/apache/catalina/realm/JNDIRealm.java +++ b/java/org/apache/catalina/realm/JNDIRealm.java @@ -2311,6 +2311,10 @@ public class JNDIRealm extends RealmBase { // Log the problem for posterity containerLog.error(sm.getString("jndiRealm.exception"), e); + // close the connection so we know it will be reopened. + close(connection); + closePooledConnections(); + // Return "not authenticated" for this request return null; } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index cbb302c..48e95c8 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,15 @@ issues do not "pop up" wrt. others). --> <section name="Tomcat 10.0.9 (markt)" rtext="in development"> + <subsection name="Catalina"> + <changelog> + <fix> + <bug>65411</bug>: Always close the connection when an uncaught + <code>NamingException</code> occurs to avoid connection locking. + Submitted by Ole Ostergaard. (remm) + </fix> + </changelog> + </subsection> <subsection name="Coyote"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org