You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/08/11 12:30:59 UTC

svn commit: r684702 - /jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java

Author: sebb
Date: Mon Aug 11 03:30:56 2008
New Revision: 684702

URL: http://svn.apache.org/viewvc?rev=684702&view=rev
Log:
perThreadPoolSet needs to be defined for remote tests too

Modified:
    jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java

Modified: jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java?rev=684702&r1=684701&r2=684702&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java (original)
+++ jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java Mon Aug 11 03:30:56 2008
@@ -60,7 +60,7 @@
     transient ResourceLimitingJdbcDataSource excaliburSource;
 
     // Keep a record of the pre-thread pools so that they can be disposed of at the end of a test
-    private transient Set perThreadPoolSet = Collections.synchronizedSet(new HashSet());
+    private transient Set perThreadPoolSet;
 
     public DataSourceElement() {
     }
@@ -79,7 +79,7 @@
                 log.debug("Disposing pool: "+dsc.getInstrumentableName()+" @"+System.identityHashCode(dsc));
                 dsc.dispose();
             }
-            perThreadPoolSet.clear();
+            perThreadPoolSet=null;
         }
     }
 
@@ -99,6 +99,7 @@
             log.error("JDBC data source already defined for: "+poolName);
         } else {
             String maxPool = getPoolMax();
+            perThreadPoolSet = Collections.synchronizedSet(new HashSet());
             if (maxPool.equals("0")){ // i.e. if we want per thread pooling
                 variables.putObject(poolName, new DataSourceComponentImpl()); // pool will be created later
             } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org