jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1212778 - /jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
Date Sat, 10 Dec 2011 12:06:24 GMT
Author: pmouawad
Date: Sat Dec 10 12:06:23 2011
New Revision: 1212778

URL: http://svn.apache.org/viewvc?rev=1212778&view=rev
Log:
Bug 52310 - variable in IPSource failed HTTP request if "Concurrent Pool Size" is enabled
ROLLBACK

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java?rev=1212778&r1=1212777&r2=1212778&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java Sat Dec 10 12:06:23
2011
@@ -25,7 +25,7 @@ import org.apache.jmeter.util.JMeterUtil
  * Keeps track of active and total thread counts.
  */
 public final class JMeterContextService {
-    private static final ThreadLocal<JMeterContext> threadContext = new InheritableThreadLocal<JMeterContext>()
{
+    private static final ThreadLocal<JMeterContext> threadContext = new ThreadLocal<JMeterContext>()
{
         @Override
         public JMeterContext initialValue() {
             return new JMeterContext();
@@ -48,6 +48,14 @@ public final class JMeterContextService 
     }
 
     /**
+     * Replace Thread Context by the parameter
+     * @param context {@link JMeterContext}
+     */
+    public static void replaceContext(JMeterContext context) {
+    	threadContext.remove();
+    	threadContext.set(context);
+    }
+    /**
      * Gives access to the current thread context.
      * 
      * @return the current thread Context



Mime
View raw message