commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r635173 - in /commons/proper/dbcp/trunk: src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java xdocs/changes.xml
Date Sun, 09 Mar 2008 06:07:23 GMT
Author: psteitz
Date: Sat Mar  8 22:07:22 2008
New Revision: 635173

URL: http://svn.apache.org/viewvc?rev=635173&view=rev
Log:
Made getPool synchronized in PoolableConnectionFactory.
Fixes inconsistent synchronization accessing _pool.
JIRA: DBCP-252

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
    commons/proper/dbcp/trunk/xdocs/changes.xml

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java?rev=635173&r1=635172&r2=635173&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java
Sat Mar  8 22:07:22 2008
@@ -244,7 +244,11 @@
         _pool = pool;
     }
 
-    public ObjectPool getPool() {
+    /**
+     * Returns the {@link ObjectPool} in which {@link Connection}s are pooled.
+     * @return the connection pool
+     */
+    synchronized public ObjectPool getPool() {
         return _pool;
     }
 

Modified: commons/proper/dbcp/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/xdocs/changes.xml?rev=635173&r1=635172&r2=635173&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/xdocs/changes.xml (original)
+++ commons/proper/dbcp/trunk/xdocs/changes.xml Sat Mar  8 22:07:22 2008
@@ -110,6 +110,10 @@
         orphaned when an exception occurs in setUpDefaults or clearWarnings in 
         IntanceKeyDataSource.getConnection.
       </action> 
+      <action dev="psteitz" type="fix" issue="DBCP-252" due-to="FindBugs">
+        Made getPool synchronized in PoolableConnectionFactory.
+        Fixes inconsistent synchronization accessing _pool.
+      </action> 
     </release>
     <release version="1.2.2" date="2007-04-04"
       description="This is a maintenance release containing bug fixes



Mime
View raw message