jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1302130 - in /jmeter/trunk: bin/jmeter.properties src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java xdocs/changes.xml
Date Sun, 18 Mar 2012 13:57:41 GMT
Author: pmouawad
Date: Sun Mar 18 13:57:41 2012
New Revision: 1302130

URL: http://svn.apache.org/viewvc?rev=1302130&view=rev
Log:
Bug 52938 - Webservice Sampler : Add a jmeter property soap.document_cache to control size
of Document Cache

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/jmeter.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1302130&r1=1302129&r2=1302130&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Sun Mar 18 13:57:41 2012
@@ -780,7 +780,7 @@ beanshell.server.file=../extras/startup.
 # CookieManager behaviour - should Cookies be stored as variables?
 # Default is false
 #CookieManager.save.cookies=false
- 
+
 # CookieManager behaviour - prefix to add to cookie name before storing it as a variable
 # Default is COOKIE_; to remove the prefix, define it as one or more spaces
 #CookieManager.name.prefix=
@@ -846,6 +846,10 @@ beanshell.server.file=../extras/startup.
 # Set the following value to true in order to skip the delete confirmation dialogue
 #confirm.delete.skip=false
 
+# Used by Webservice Sampler (SOAP)
+# Size of Document Cache
+#soap.document_cache=50
+
 #---------------------------------------------------------------------------
 # Classpath configuration
 #---------------------------------------------------------------------------

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java?rev=1302130&r1=1302129&r2=1302130&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/DOMPool.java Sun Mar
18 13:57:41 2012
@@ -18,9 +18,11 @@
 
 package org.apache.jmeter.protocol.http.util;
 
+import java.util.Collections;
 import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.commons.collections.map.LRUMap;
+import org.apache.jmeter.util.JMeterUtils;
 import org.w3c.dom.Document;
 
 /**
@@ -45,7 +47,8 @@ public final class DOMPool {
      * test on an old system will likely run into memory or CPU problems long
      * before the HashMap is an issue.
      */
-    private static final Map<Object, Document> MEMCACHE = new ConcurrentHashMap<Object,
Document>(50);
+    private static final Map<Object, Document> MEMCACHE = Collections.<Object, Document>synchronizedMap(
+            new LRUMap(JMeterUtils.getPropDefault("soap.document_cache", 50)));
 
     /**
      * Return a document.

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1302130&r1=1302129&r2=1302130&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Mar 18 13:57:41 2012
@@ -145,6 +145,7 @@ empty Name and Value are no more saved.
 <ul>
 <li>Bug 52775 - JMS Publisher : Add Non Persistent Delivery option</li>
 <li>Bug 52810 - Enable setting JMS Properties through JMS Publisher sampler</li>
+<li>Bug 52938 - Webservice Sampler : Add a jmeter property soap.document_cache to control
size of Document Cache</li>
 </ul>
 
 <h3>Controllers</h3>



Mime
View raw message