commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r907422 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java
Date Sun, 07 Feb 2010 14:14:36 GMT
Author: psteitz
Date: Sun Feb  7 14:14:35 2010
New Revision: 907422

URL: http://svn.apache.org/viewvc?rev=907422&view=rev
Log:
Made getConnectionCalled volatile.

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java?rev=907422&r1=907421&r2=907422&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java
(original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java
Sun Feb  7 14:14:35 2010
@@ -95,7 +95,8 @@
     */
     protected static final int UNKNOWN_TRANSACTIONISOLATION = -1;
 
-    private boolean getConnectionCalled = false;
+    /** Guards property setters - once true, setters throw IllegalStateException */
+    private volatile boolean getConnectionCalled = false;
 
     private ConnectionPoolDataSource dataSource = null;
     /** DataSource Name used to find the ConnectionPoolDataSource */



Mime
View raw message