From: fhanik Date: Fri, 20 May 2011 22:03:39 +0000 (+0000) Subject: https://issues.apache.org/bugzilla/show_bug.cgi?id=51185 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7e67d1c4bdabfa39f5f17f135d28e80c56bc8229;p=tomcat7.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=51185 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1125573 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java index 225d07a3c..2280552c0 100644 --- a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java +++ b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java @@ -92,7 +92,20 @@ public class DataSourceProxy implements PoolConfiguration { * @return Driver * @throws SQLException */ - public synchronized ConnectionPool createPool() throws SQLException { + public ConnectionPool createPool() throws SQLException { + if (pool != null) { + return pool; + } else { + return pCreatePool(); + } + } + + /** + * Sets up the connection pool, by creating a pooling driver. + * @return Driver + * @throws SQLException + */ + private synchronized ConnectionPool pCreatePool() throws SQLException { if (pool != null) { return pool; } else {