This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 95c74cb Reduce diff to Commons DBCP 2 to aid future maintenance 95c74cb is described below commit 95c74cbc4f304b8bd02cecae41625b7be4db7a7f Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri May 3 17:39:56 2019 +0100 Reduce diff to Commons DBCP 2 to aid future maintenance --- .../apache/tomcat/dbcp/dbcp2/BasicDataSource.java | 30 +++++++++++----------- .../org/apache/tomcat/dbcp/dbcp2/Jdbc41Bridge.java | 15 +++++------ .../dbcp/dbcp2/managed/BasicManagedDataSource.java | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java b/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java index 37f036d..ba3e38a 100644 --- a/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java +++ b/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.java @@ -750,6 +750,21 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** + * If the connection pool implements {@link org.apache.tomcat.dbcp.pool2.UsageTracking UsageTracking}, should the + * connection pool record a stack trace every time a method is called on a pooled connection and retain the most + * recent stack trace to aid debugging of abandoned connections? + * + * @return <code>true</code> if usage tracking is enabled + */ + @Override + public boolean getAbandonedUsageTracking() { + if (abandonedConfig != null) { + return abandonedConfig.getUseUsageTracking(); + } + return false; + } + + /** * Returns the value of the flag that controls whether or not connections being returned to the pool will be checked * and configured with {@link Connection#setAutoCommit(boolean) Connection.setAutoCommit(true)} if the auto commit * setting is {@code false} when the connection is returned. It is <code>true</code> by default. @@ -1633,21 +1648,6 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * If the connection pool implements {@link org.apache.tomcat.dbcp.pool2.UsageTracking UsageTracking}, should the - * connection pool record a stack trace every time a method is called on a pooled connection and retain the most - * recent stack trace to aid debugging of abandoned connections? - * - * @return <code>true</code> if usage tracking is enabled - */ - @Override - public boolean getAbandonedUsageTracking() { - if (abandonedConfig != null) { - return abandonedConfig.getUseUsageTracking(); - } - return false; - } - - /** * If the connection pool implements {@link org.apache.tomcat.dbcp.pool2.UsageTracking UsageTracking}, configure whether * the connection pool should record a stack trace every time a method is called on a pooled connection and retain * the most recent stack trace to aid debugging of abandoned connections. diff --git a/java/org/apache/tomcat/dbcp/dbcp2/Jdbc41Bridge.java b/java/org/apache/tomcat/dbcp/dbcp2/Jdbc41Bridge.java index 99e92bd..b4ee5b9 100644 --- a/java/org/apache/tomcat/dbcp/dbcp2/Jdbc41Bridge.java +++ b/java/org/apache/tomcat/dbcp/dbcp2/Jdbc41Bridge.java @@ -1,5 +1,4 @@ -/** - * +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -7,13 +6,13 @@ * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.tomcat.dbcp.dbcp2; diff --git a/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java b/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java index 8d021e3..654edc2 100644 --- a/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java +++ b/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java @@ -52,7 +52,7 @@ import org.apache.tomcat.dbcp.dbcp2.Utils; */ public class BasicManagedDataSource extends BasicDataSource { - /** Transaction Synchronization Registry */ + /** Transaction Registry */ private TransactionRegistry transactionRegistry; /** Transaction Manager */ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org