From 1b0eb35da289da13cc28be21c9c3207687f85f1d Mon Sep 17 00:00:00 2001 From: fhanik Date: Mon, 23 Mar 2009 12:07:36 +0000 Subject: [PATCH] expose the poolname through a public method, this will allow one to retrieve the actual connection pool through JMX as well git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@757381 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java b/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java index 12c7b7c88..77a20a342 100644 --- a/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java +++ b/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java @@ -44,10 +44,6 @@ public class DataSourceProxy { protected volatile ConnectionPool pool = null; - public ConnectionPool getPool() { - return pool; - } - protected PoolProperties poolProperties = new PoolProperties(); public DataSourceProxy() { @@ -125,6 +121,14 @@ public class DataSourceProxy { String password) throws SQLException { return (PooledConnection) getConnection(); } + + public ConnectionPool getPool() { + return pool; + } + + public String getPoolName() { + return pool.getName(); + } /** * {@inheritDoc} -- 2.11.0