From dev-return-198566-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Fri May 3 16:40:21 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6DAFB18064D for ; Fri, 3 May 2019 18:40:21 +0200 (CEST) Received: (qmail 5035 invoked by uid 500); 3 May 2019 16:40:19 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 5025 invoked by uid 99); 3 May 2019 16:40:19 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2019 16:40:19 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 9921E871F3; Fri, 3 May 2019 16:40:14 +0000 (UTC) Date: Fri, 03 May 2019 16:40:14 +0000 To: "dev@tomcat.apache.org" Subject: [tomcat] branch master updated: Reduce diff to Commons DBCP 2 to aid future maintenance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155690161454.29072.4627076273399222561@gitbox.apache.org> From: markt@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: tomcat X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: c33732159e28d073d456e1f832013ffd8702cd41 X-Git-Newrev: 95c74cbc4f304b8bd02cecae41625b7be4db7a7f X-Git-Rev: 95c74cbc4f304b8bd02cecae41625b7be4db7a7f X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 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 true 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 true 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 true 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-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org