[jboss-cvs] JBossAS SVN: r109386 - in projects/jboss-jca/branches/performance: doc/perfguide and 24 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 19 03:00:36 EST 2010


Author: jesper.pedersen
Date: 2010-11-19 03:00:34 -0500 (Fri, 19 Nov 2010)
New Revision: 109386

Added:
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/sampler/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/sampler/jmx/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/IronJacamarJMXSampler.java
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMX.java
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMXSamplerResult.java
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/data/
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/data/LoadData.java
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/Monitor-Test-Plan.jmx
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/CommitStatistics.txt
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/RuleHelper.txt
   projects/jboss-jca/branches/performance/tools/byteman/
   projects/jboss-jca/branches/performance/tools/byteman/lib/
   projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-install.jar
   projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-sample.jar
   projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-submit.jar
   projects/jboss-jca/branches/performance/tools/byteman/lib/byteman.jar
   projects/jboss-jca/branches/performance/tools/h2/
   projects/jboss-jca/branches/performance/tools/h2/lib/
   projects/jboss-jca/branches/performance/tools/h2/lib/h2-1.2.145.jar
Modified:
   projects/jboss-jca/branches/performance/build.xml
   projects/jboss-jca/branches/performance/doc/perfguide/build.xml
   projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml
   projects/jboss-jca/branches/performance/jmeter/build.xml
   projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/http/HttpConnectionServlet.java
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/WEB-INF/web.xml
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Direct-JDBC.jmx
   projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Http-Test.jmx
   projects/jboss-jca/branches/performance/pojos/src/main/java/org/jboss/jca/performance/pojos/DatabaseTester.java
   projects/jboss-jca/branches/performance/tools/jmeter/lib/ext/ApacheJMeter_jdbc.jar
Log:
JMeter update

Modified: projects/jboss-jca/branches/performance/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/build.xml	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/build.xml	2010-11-19 08:00:34 UTC (rev 109386)
@@ -367,5 +367,12 @@
   <target name="jmeter">
     <ant dir="jmeter" target="jmeter"/>
   </target>
+  
+  <!-- ================================= 
+       Target: jmeter.monitoring              
+       ================================= -->
+  <target name="jmeter.monitoring">
+    <ant dir="jmeter" target="jmeter.monitoring"/>
+  </target>
 
 </project>

Modified: projects/jboss-jca/branches/performance/doc/perfguide/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/doc/perfguide/build.xml	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/doc/perfguide/build.xml	2010-11-19 08:00:34 UTC (rev 109386)
@@ -1,3 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
 <project name="perfguide" default="all" basedir=".">
 
   <property name="build.dir" value="${basedir}/../../target/docs/perfguide"/>

Modified: projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml
===================================================================
--- projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml	2010-11-19 08:00:34 UTC (rev 109386)
@@ -27,17 +27,19 @@
 ant download-servers
 ant benchmark</programlisting>
      
-   <para>To start JMeter call the following Ant target. Calling this target starts a HSQLDB database and server required for benchmarking. The started database is populated with sample data. When the target executes it detects if a database is already running and will start it if not. The target does the same for the server.</para>
+   <para>To start JMeter call the following Ant target. Calling this target starts a the IronJacmar server with an embedded H2 database required for benchmarking. The database is populated with sample data.</para>
    <programlisting>ant jmeter</programlisting>
 
-   <para>With the JMeter integration comes several Test Plans. Test Plans are JMeter test configurations containing the sequence of requests to create the desired load. The included test plans are straight forward. The default test plan is the first listed below and will be loaded when JMeter is started. To load a different test plan select "File - Open" from the JMeter menu.</para>
+   <para>With the JMeter integration comes several Test Plans. Test Plans are JMeter test configurations containing the sequence of requests to create the desired load. The default test plan is the first listed below and will be loaded when JMeter is started. To load one of the other test plans select "File - Open" from the JMeter menu.</para>
    <programlisting>src/main/resources/jmeter/Http-Test.jmx
-src/main/resources/jmeter/CPU-usage-Http-Test.jmx (not available in Beta3 release)
 src/main/resources/jmeter/Direct-JDBC.jmx
-src/main/resources/jmeter/CPU-usage-Direct-JDBC.jmx (not available in Beta3 release)</programlisting>
+src/main/resources/jmeter/Monitor-Test-Plan.jmx</programlisting>
    </section>
    
    <para>The number of concurrent threads executing the requests can be configured in JMeter. See the <ulink url="http://jakarta.apache.org/jmeter/usermanual/index.html">JMeter User Manual</ulink> for step-by-step instructions.</para>
-   <para>To view the performance graph during a test run select the "Graph Results" node in the Test Plan.</para>
-
+   <para>To view the performance graph during a test run select the "Graph Results" node in the Http/Direct-JBDC Test Plan.</para>
+   <para>The Monitor Test Plan provides runtime statistics for the rate of transactions completed per second. The test plan uses JMX to gather the metrics. To open the monitoring test plan execute the following command.</para>
+   <programlisting>ant jmeter.monitoring</programlisting>
+   <para>Run the Monitor test plan at the same time as one of the other plans. To operate using JMX you will need to configure the JAVA_HOME environment property. It needs setting with the home directory of a Java Development Kit. The included rmiregistry service is started to expose the MBean to JMX clients.</para>
+   <para>Note, overhead when running JMeter and the Graph Results can be reduced. Try un-selecting the check boxes labeled 'Average', 'Median', 'Deviation' and 'Threshold' leaving the 'Data' checkbox selected.</para>
 </chapter>

Modified: projects/jboss-jca/branches/performance/jmeter/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/build.xml	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/jmeter/build.xml	2010-11-19 08:00:34 UTC (rev 109386)
@@ -36,22 +36,67 @@
   <property name="javac.optimize" value="false" />
   <property name="target.dir" value="false" />
   <property name="server-home" value="../root/servers/jbjca-${ironjacamar.version}/ironjacamar-${ironjacamar.version}" />
+  <property name="jbjca.home" value="${build-root.root.dir}/servers/${jbjca.version}/ironjacamar-${jbjca.kit}"/>
   <property name="jmeter.tools.dir" value="../tools/jmeter" />
   <property name="hsqldb.tools.dir" value="../tools/hsqldb" />
+  <property name="h2.tools.dir" value="../tools/h2" />
+  <property name="byteman.tools.dir" value="${basedir}/../tools/byteman" />
+  <property environment="env"/>
   
-  <path id="src.compile.classpath">
-    <fileset dir="../lib/common" includes="*.jar" />
-  </path>
+  <property environment="env"/>
   
   <path id="jmeter.classpath">
     <fileset dir="${jmeter.tools.dir}">
       <include name="**/*.jar" />
     </fileset>
-    <fileset dir="${hsqldb.tools.dir}">
-      <include name="**/*.jar" />
+  </path>
+       
+  <path id="src.compile.classpath">
+    <fileset dir="../lib/common" includes="*.jar" />
+    <fileset dir="${jmeter.tools.dir}/lib">
+      <include name="logkit-2.0.jar"/>
     </fileset>
+    
+    <fileset dir="${jmeter.tools.dir}/lib/ext">
+      <include name="ApacheJMeter_core.jar"/>
+      <include name="ApacheJMeter_java.jar"/>
+      <include name="ApacheJMeter_components.jar"/>
+    </fileset>
   </path>
   
+  <path id="byteman.classpath">
+     <fileset dir="${byteman.tools.dir}/lib">
+       <include name="*.jar" />
+     </fileset>
+   </path>  
+   
+  <path id="hsqldb.classpath">
+    <path refid="jmeter.classpath"/>
+    <fileset dir="${byteman.tools.dir}/lib">
+      <include name="*.jar" />
+    </fileset>
+  </path>
+
+  <path id="h2.classpath">
+    <path refid="jmeter.classpath"/>
+    <pathelement path="${h2.tools.dir}/h2-1.2.145.jar"/>
+    <fileset dir="${byteman.tools.dir}/lib">
+      <include name="*.jar" />
+    </fileset>
+  </path>
+  
+  <path id="ironjacamar.classpath">
+    <fileset dir="${server-home}/bin">
+      <include name="ironjacamar-sjc.jar"/>
+    </fileset>
+    <fileset dir="${server-home}/lib">
+      <include name="*.jar"/>
+    </fileset>
+    <fileset dir="${server-home}/lib/jetty">
+      <include name="*.jar"/>
+    </fileset>
+  </path>
+  
   <!-- ================================= 
        Target: compile
        ================================= -->
@@ -81,16 +126,30 @@
     <mkdir dir="${build.jmeter.dir}/wars" />
     
     <delete file="${build.jmeter.dir}/jars/ironjacamar-performance-jmeter.jar" />
+    <delete file="${build.jmeter.dir}/jars/jmeter-jmx-extension.jar" />
     
     <jar destfile="${build.jmeter.dir}/jars/ironjacamar-performance-jmeter.jar"
-         basedir="${build.jmeter.dir}/impl" 
          index="true">
+      <fileset dir="${build.jmeter.dir}/impl">
+         <exclude name="org/apache/jmeter/protocol/java/test/jmx/*"/>
+      </fileset>
       <manifest>
         <attribute name="Implementation-Title" value="IronJacamar Performance JMeter" />
         <attribute name="Implementation-Vendor" value="JBoss, by Red Hat" />
         <attribute name="Implementation-Vendor-Id" value="org.jboss" />
       </manifest>
     </jar>
+    <jar destfile="${build.jmeter.dir}/jars/jmeter-jmx-extension.jar"
+         index="true">
+      <fileset dir="${build.jmeter.dir}/impl">
+         <include name="org/apache/jmeter/protocol/java/test/jmx/*"/>
+      </fileset>
+      <manifest>
+        <attribute name="Implementation-Title" value="JMeter Extension for JMX Monitoring" />
+        <attribute name="Implementation-Vendor" value="JBoss, by Red Hat" />
+        <attribute name="Implementation-Vendor-Id" value="org.jboss" />
+      </manifest>
+    </jar>
     
     <delete file="${build.jmeter.dir}/wars/jbjca-web.war" />
     
@@ -117,38 +176,39 @@
   <target name="deploy" depends="wars">
     <copy file="${build.jmeter.dir}/wars/jbjca-web.war" todir="${server-home}/system" />
     <copy file="src/main/resources/jca-local-h2-ds.xml" todir="${server-home}/deploy" />
-    <copy file="../tools/hsqldb/lib/hsqldb.jar" todir="${server-home}/lib" />
+    <copy file="${build.jmeter.dir}/jars/jmeter-jmx-extension.jar" todir="../tools/jmeter/lib/ext"/>
+    <copy file="${h2.tools.dir}/h2-1.2.145.jar" todir="../tools/jmeter/lib"/>
+    <copy file="${h2.tools.dir}/h2-1.2.145.jar" todir="${server-home}/lib" />
   </target>
   
-  <target name="jmeter" depends="deploy,server">
+  <target name="jmeter" depends="server" >
+    <antcall target="run.jmeter">
+      <param name="test.plan" value="src/main/resources/jmeter/Http-Test.jmx"/>
+    </antcall>  
+  </target>
+  
+  <target name="jmeter.monitoring" depends="server">
+    <antcall target="run.jmeter">
+      <param name="test.plan" value="src/main/resources/jmeter/Monitor-Test-Plan.jmx"/>
+    </antcall>
+    <get src="http://localhost:8080/jbjca-web/jcaconn" dest="/tmp/"/>
+    <echo message="Activated Periodic stats JMX bean." />
+  </target>
+    
+  <target name="run.jmeter">
     <java jar="${jmeter.tools.dir}/bin/ApacheJMeter.jar" 
-          fork="true"
-          spawn="true" 
-          classpathref="jmeter.classpath">
+        fork="true"
+        spawn="true" 
+        classpathref="jmeter.classpath">
       <jvmarg value="-Dapple.laf.useScreenMenuBar=true" />
+      <!--jvmarg value="-Xdebug" />
+      <jvmrg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" /-->
       <arg value="-t" />
-      <arg value="src/main/resources/jmeter/Http-Test.jmx" />
+      <arg value="${test.plan}" />
     </java>
     <echo message="Started JMeter." />
   </target>
   
-  <target name="database" unless="database.isAvailable" depends="check-database-isRunning">
-    <java fork="true" spawn="true" classpathref="jmeter.classpath" classname="org.hsqldb.Server">
-      <arg value="-database.0" />
-      <arg value="mem:jbjca" />
-      <arg value="-silent" />
-      <arg value="true" />
-    </java>
-    <parallel>
-      <waitfor maxwait="1" maxwaitunit="minute" checkevery="1" checkeveryunit="second">
-        <socket server="localhost" port="9001" />
-      </waitfor>
-    </parallel>
-    <echo message="Database started." />
-    <antcall target="sample-data" />
-    <echo message="Sample data loaded." />
-  </target>
-  
   <target name="check-database-isRunning">
     <condition property="database.isAvailable">
       <socket server="localhost" port="9001" />
@@ -156,29 +216,40 @@
     <echo message="Status of running database is [${database.isAvailable}]." />
   </target>
   
-  <target name="shutdown-database">
-    <sql driver="org.hsqldb.jdbcDriver" 
-         url="jdbc:hsqldb:hsql://localhost" 
-         userid="sa" password="" 
-         classpathref="jmeter.classpath"
-         onerror="stop">
-      SHUTDOWN;
-    </sql>
-  </target>
-  
   <target name="sample-data">
-    <sql src="src/main/resources/sql/sample-data.sql" 
-         driver="org.hsqldb.jdbc.JDBCDriver" 
-         url="jdbc:hsqldb:hsql://localhost" 
-         userid="sa" password="" 
-         classpathref="jmeter.classpath" />
+    <java classname="org.jboss.byteman.agent.submit.Submit" classpathref="byteman.classpath">
+       <arg value="-s"/>
+       <arg value="${byteman.tools.dir}/lib/byteman-sample.jar"/>
+    </java>
+    <java classname="org.jboss.byteman.agent.submit.Submit" classpathref="byteman.classpath">
+       <arg value="-l"/>
+       <arg value="src/main/resources/byteman/ModifyHelperRMIConfiguration.txt"/>
+    </java>
+    <java classname="org.jboss.byteman.agent.submit.Submit" classpathref="byteman.classpath">
+      <arg value="-l"/>
+      <arg value="src/main/resources/byteman/CommitStatistics.txt"/>
+    </java>
+    <java classname="org.jboss.byteman.agent.submit.Submit" classpathref="byteman.classpath">
+      <arg value="-l"/>
+      <arg value="src/main/resources/byteman/RuleHelper.txt"/>
+    </java>
+    <get src="http://localhost:8080/jbjca-web/load-data" dest="/tmp/"/>
   </target>
   
-  <target name="server" unless="server.isAvailable" depends="database,check-server-isRunning,build-servers.os-check">
+  <target name="server" unless="server.isAvailable" depends="deploy,check-server-isRunning,build-servers.os-check,rmiregistry">
     <exec executable="${exec}" spawn="true" dir="${server-home}/bin">
       <arg line="run.${ext}"/>
+      <env key="JAVA_OPTS" value="-javaagent:${byteman.tools.dir}/lib/byteman.jar=listener:true -Dorg.jboss.byteman.verbose"/>
+      <!-- -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -->
     </exec>
+  
+    <parallel>
+      <waitfor maxwait="1" maxwaitunit="minute" checkevery="1" checkeveryunit="second">
+         <http url="http://localhost:8080/" />
+      </waitfor>
+    </parallel>
     <echo message="Started server."/>
+    <antcall target="sample-data" />
   </target>
   
   <target name="check-server-isRunning">
@@ -188,4 +259,22 @@
     <echo message="Status of running server is [${server.isAvailable}]." />
   </target>
   
+  <target name="check-rmiregistry-isRunning">
+    <condition property="rmiregistry.isAvailable">
+      <socket server="localhost" port="9999" />
+    </condition>
+    <echo message="Status of running server is [${rmiregistry.isAvailable}]." />
+  </target>
+
+  <target name="rmiregistry" unless="rmiregistry.isAvailable" depends="check-rmiregistry-isRunning">
+    <exec executable="${env.JAVA_HOME}/bin/rmiregistry" spawn="true">
+      <arg value="9999"/>
+    </exec>
+    <parallel>
+      <waitfor maxwait="1" maxwaitunit="minute" checkevery="1" checkeveryunit="second">
+        <socket server="localhost" port="9999" />
+      </waitfor>
+    </parallel>
+    <echo message="Started rmiregistry."/>
+  </target>
 </project>

Added: projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/IronJacamarJMXSampler.java
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/IronJacamarJMXSampler.java	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/IronJacamarJMXSampler.java	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,309 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.apache.jmeter.protocol.java.test.jmx;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.RuntimeMBeanException;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.jmeter.config.Arguments;
+import org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient;
+import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.log.Logger;
+
+/**
+ * A Byteman JMXSampler.
+ * This sampler will connect to a Dynamic JMXBean
+ * and query an attribute of the bean.
+ * This implementation is not thread safe. Only one thread
+ * should be configured in JMeter to run this sampler.
+ * 
+ * @author <a href="jwhiting at redhat.com">Jeremy Whiting</a>
+ * @version $Revision: 1.1 $
+ */
+public class IronJacamarJMXSampler extends AbstractJavaSamplerClient implements
+      Serializable
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1931229441425252541L;
+   private JMXDelegate delegate = new JMXDelegate();
+   private String label = null;
+
+   /**
+    * This establishes resources and keeps these open until the test is torn
+    * down. This occurs when the thread group stops.
+    */
+   @Override
+   public void setupTest(JavaSamplerContext context)
+   {
+      super.setupTest(context);
+      setVariables(context);
+      delegate.setup(context);
+   }
+
+   /**
+    * Execute the sample timing and return a Result 
+    * object. This sampler sets the elapsed time attribute on the
+    * Result when in fact the value is the tx rate. This is a
+    * simple way of using the Graph Results Listener. Rather than
+    * create a listener to display the rate which in the end is
+    * an identical graph.
+    */
+   @Override
+   public SampleResult runTest(JavaSamplerContext context)
+   {
+      if (getLogger().isDebugEnabled())
+      {
+         getLogger().debug("JMXSampler called.");
+      }
+      JMXSamplerResult returnValue = new JMXSamplerResult();
+      returnValue.setSampleLabel(label);
+      
+      if (delegate.isSetup)
+      {
+         returnValue.setSamplerData(SampleResult.TEXT);
+         returnValue.setContentType("text/plain");
+         returnValue.setDataEncoding(delegate.UTF8);
+         returnValue.setResponseData( delegate.getTxPerSecondValue());
+         try
+         {
+            Float amount = Float.valueOf(returnValue.getResponseDataAsString());
+            returnValue.setTime(amount.longValue());
+            returnValue.setSuccessful(true);
+            returnValue.setResponseCodeOK();
+            returnValue.setResponseMessageOK();
+         }
+         catch (NumberFormatException nfe)
+         {
+            returnValue.setSuccessful(false);
+         }
+      }
+      else 
+      {
+         returnValue.setSuccessful(false);
+      }
+      return returnValue;
+   }
+
+   @Override
+   public void teardownTest(JavaSamplerContext context)
+   {
+      super.teardownTest(context);
+      // close down open resources
+      delegate.tearDown();
+   }
+
+   /**
+    * Default parameters the test supports
+    */
+   public Arguments getDefaultParameters()
+   {
+      Arguments params = new Arguments();
+      params.addArgument(JMX.JMX_HOST.toString(), "localhost");
+      params.addArgument(JMX.JMX_PORT.toString(), "9999");
+      params.addArgument(JMX.JMXBEAN_NAME.toString(), "org.jboss.byteman.sample.jmx:type=PeriodicStats");
+      params.addArgument(JMX.JMXBEAN_STATS_RATE_ATTR.toString(), "transaction commits : rate");
+      params.addArgument(JMX.SAMPLER_LABEL.toString(), "Tx rate sampler");
+      return params;
+   }
+
+   public void setVariables(JavaSamplerContext context)
+   {
+      delegate.jmxHost = context.getParameter(JMX.JMX_HOST.toString());
+      delegate.jmxPort = context.getParameter(JMX.JMX_PORT.toString());
+      delegate.jmxBeanName = context.getParameter(JMX.JMXBEAN_NAME.toString());
+      delegate.jmxBeanRateAttrName = context.getParameter(JMX.JMXBEAN_STATS_RATE_ATTR.toString());
+      label = context.getParameter(JMX.SAMPLER_LABEL.toString());
+   }
+   @Override
+   protected Logger getLogger()
+   {
+      return super.getLogger();
+   }
+   
+   /**
+    * A JMXDelegate object to handle networking and io issues, also
+    * decode data into types used in JMeter.
+    * 
+    * @author <a href="jwhiting at redhat.com">Jeremy Whiting</a>
+    * @version $Revision: 1.1 $
+    */
+   class JMXDelegate implements Serializable
+   {
+      /** The serialVersionUID */
+      private static final long serialVersionUID = 1415401687196004917L;
+      private final String jmxUrlPattern = "service:jmx:rmi:///jndi/rmi://%1$s:%2$s/jmxrmi"; //service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi
+      static final String UTF8 = "UTF-8";
+      private JMXConnector connector = null;
+      private MBeanServerConnection serverConnection = null;
+      private boolean isSetup = false;
+      private byte[] DEFAULT_SAMPLE_VALUE  ;
+      private String jmxHost = null;
+      private String jmxPort = null;
+      private String jmxBeanName = null;
+      private String jmxBeanRateAttrName = null;
+      private ObjectName name = null;
+      
+      public boolean setup(JavaSamplerContext context)
+      {
+         /*
+          * open resources used during the sample if not initialised before.
+          */
+         try
+         {
+            if (null == this.connector)
+            {
+               String jmxUrl = String.format(jmxUrlPattern , jmxHost, jmxPort);
+               this.connector = JMXConnectorFactory.connect(new JMXServiceURL(
+                     jmxUrl));
+               if (null == serverConnection && null != this.connector)
+               {
+                  this.serverConnection = this.connector.getMBeanServerConnection();
+                  /*
+                  for (String domain : serverConnection.getDomains())
+                  {
+                     getLogger().info("Domain["+ domain+ "]");
+                  }*/
+                  
+                  /*
+                  Set<ObjectName> names = serverConnection.queryNames(name, null);
+                  getLogger().info("Getting the JMXBean names");
+                  for(ObjectName oName : names)
+                  {
+                     getLogger().info(oName.getDomain()+oName.getCanonicalName());
+                  }
+                  */
+                  //AttributeList attrList = serverConnection.getAttributes(name, attributes)
+                  
+                  name = ObjectName.getInstance(jmxBeanName);
+                  
+                  isSetup = true;
+               }
+            }
+         } 
+         catch (IOException ioe)
+         {
+            getLogger().error(ioe.getMessage(), ioe);
+         }
+         catch (MalformedObjectNameException mone)
+         {
+            getLogger().error(mone.getMessage(), mone);
+         }
+         return isSetup;
+      }
+      /**
+       * Release any resources.
+       *
+       */
+      public void tearDown()
+      {
+         try 
+         {
+            connector.close();
+         }
+         catch (IOException ioe)
+         {
+            getLogger().error(ioe.getMessage(), ioe);
+         }
+      }
+      /**
+       * Retrieve the latest value of the tx rate from
+       * the PeriodicStats dynamic MBean.
+       * 
+       * @return the rate, the value is a float
+       */
+      public byte[] getTxPerSecondValue()
+      {
+         byte[] returnValue = DEFAULT_SAMPLE_VALUE;
+         if (null != serverConnection)
+         {
+            try
+            {
+               /* Get attribute on MBean */
+               /*String[] attrs = { jmxBeanRateAttrName};
+               AttributeList list = serverConnection.getAttributes(name, attrs)  ;
+               for (Attribute attr : list.asList())
+               {
+                  getLogger().info("attr["+attr.getName()+"]");
+               }*/
+               Object beanAttrValue = serverConnection.getAttribute(name, jmxBeanRateAttrName);
+               if (null != beanAttrValue)
+               {
+                  returnValue = beanAttrValue.toString().getBytes("UTF-8");
+               }
+            }
+            catch (IOException ioe)
+            {
+               getLogger().error(ioe.getMessage(), ioe);
+            }
+            catch (ReflectionException re)
+            {
+               getLogger().error(re.getMessage(), re);
+            }
+            catch (InstanceNotFoundException infe)
+            {
+               getLogger().error(infe.getMessage(), infe);
+            }
+            catch (AttributeNotFoundException anfe)
+            {
+               getLogger().error(anfe.getMessage(), anfe);
+            }
+            catch (MBeanException mbe)
+            {
+               getLogger().error(mbe.getMessage(), mbe);
+            }
+            catch (RuntimeMBeanException rmbe)
+            {
+               getLogger().error(rmbe.getMessage(), rmbe);
+            }
+         }
+         return returnValue;
+      }
+      /**
+       * Constructor for IronJacamarJMXSampler.JMXDelegate.
+       * 
+       */
+      public JMXDelegate()
+      {
+         try
+         {
+            DEFAULT_SAMPLE_VALUE  = "Connection to JMX server not established".getBytes(UTF8);
+         }
+         catch (UnsupportedEncodingException iee){}
+      }
+   }
+   
+}

Added: projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMX.java
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMX.java	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMX.java	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,37 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2010, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.apache.jmeter.protocol.java.test.jmx;
+
+/**
+ * A JMX.
+ * 
+ * @author <a href="jwhiting at redhat.com">Jeremy Whiting</a>
+ * @version $Revision: 1.1 $
+ */
+public enum JMX
+{
+   JMX_URL_NAME, JMX_PORT, JMX_HOST,
+   JMXBEAN_NAME, JMXBEAN_STATS_RATE_ATTR,
+   SAMPLER_LABEL
+   
+}

Added: projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMXSamplerResult.java
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMXSamplerResult.java	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/java/org/apache/jmeter/protocol/java/test/jmx/JMXSamplerResult.java	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,67 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2010, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.apache.jmeter.protocol.java.test.jmx;
+
+import org.apache.jmeter.samplers.SampleResult;
+
+/**
+ * A JMXSamplingResult.
+ * This object overrides the behaviour in SampleResult allowing
+ * the time field to be set directly.
+ * This should be used with the JMXSampler.
+ * 
+ * @author <a href="jwhiting at redhat.com">Jeremy Whiting</a>
+ * @version $Revision: 1.1 $
+ */
+public class JMXSamplerResult extends SampleResult
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -8805342625973274730L;
+   
+   private long time = 0;
+
+   /**
+    * Get the time.
+    * 
+    * @return the time.
+    */
+   @Override
+   public long getTime()
+   {
+      return time;
+   }
+
+   /**
+    * Set the time.
+    * 
+    * @param time The time to set.
+    */
+   public void setTime(long time)
+   {
+      this.time = time;
+   }
+   
+   
+   
+}

Added: projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/data/LoadData.java
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/data/LoadData.java	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/data/LoadData.java	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,206 @@
+ /*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2010, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+
+package org.jboss.jca.performance.servlet.data;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.Statement;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
+import javax.transaction.UserTransaction;
+
+/**
+ * A LoadData servlet to create database objects and sample
+ * data.
+ * 
+ * @author <a href="jwhiting at redhat.com">Jeremy Whiting</a>
+ * @version $Revision: 1.1 $
+ */
+public class LoadData extends HttpServlet
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 3632326130289763774L;
+   public static final String FAIL = "FAIL" ;  
+   public static final String SUCCESS = "SUCCESS" ;
+   private static final String JNDI_NAME = "java:/SampleDS";
+   private static final String JNDI_USER_TRANSACTION = "java:/UserTransaction";
+   public static final String[] DROP_TABLE_STATEMENTS =  {"DROP TABLE Item IF EXISTS;", "DROP TABLE Invoice IF EXISTS;", "DROP TABLE Product IF EXISTS;", "DROP TABLE Customer IF EXISTS;"};
+   public static final String[] CREATE_TABLE_STATEMENT = {"CREATE TABLE Customer(ID INTEGER PRIMARY KEY,FirstName VARCHAR(20),LastName VARCHAR(20),Street VARCHAR(20),City VARCHAR(20));", "CREATE TABLE Product(ID INTEGER PRIMARY KEY,Name VARCHAR(20),Price DECIMAL(10,2));", "CREATE TABLE Invoice(ID INTEGER PRIMARY KEY,CustomerID INTEGER,Total DECIMAL(10,2), FOREIGN KEY (CustomerId) REFERENCES Customer(ID) ON DELETE CASCADE);", "CREATE TABLE Item(InvoiceID INTEGER,Item INTEGER,ProductID INTEGER,Quantity INTEGER,Cost DECIMAL(10,2),PRIMARY KEY(InvoiceID,Item), FOREIGN KEY (InvoiceId) REFERENCES Invoice (ID) ON DELETE CASCADE, FOREIGN KEY (ProductId) REFERENCES Product(ID) ON DELETE CASCADE);"};
+   public static final String[] INSERT_STATEMENT = {"INSERT INTO Customer VALUES(0,'Laura','Steel','429 Seventh Av.','Dallas');", "INSERT INTO Product VALUES(0,'Iron Iron',54);", "INSERT INTO Invoice VALUES(0,0,0.0);", "INSERT INTO Item VALUES(0,10,0,22,1.5);"};
+   
+   @Override
+   protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+         throws ServletException, IOException
+   {
+      resp.setHeader("Content Type", "text/html");
+      Context context = null;
+      UserTransaction userTransaction = null;
+      DataSource dataSource = null;
+      Connection connection = null;
+      Statement statement= null;
+      String result = FAIL;
+      boolean inserted = false;
+      boolean created = false;
+      try
+      {
+         context = new InitialContext();
+         if (null != context)
+         {
+            userTransaction = (UserTransaction)context.lookup(JNDI_USER_TRANSACTION);
+            userTransaction.begin();
+            dataSource = (DataSource)context.lookup(JNDI_NAME);
+            connection = dataSource.getConnection();
+            try
+            {
+               statement = connection.createStatement();
+               for (String sql : CREATE_TABLE_STATEMENT)
+               {
+                  statement.addBatch(sql);
+               }
+               int[] batchReturnCodes = statement.executeBatch();
+               boolean createdErrors = false;
+               for (int code : batchReturnCodes)
+               {
+                  if (0 != code)
+                  {// failure
+                     result = FAIL;
+                     resp.setStatus(500);
+                     createdErrors = true;
+                     break;
+                  }
+               }
+               created = !createdErrors;
+            }
+            catch (Exception e)
+            {
+               log(e.getMessage(), e);
+               log(e.getCause().getMessage());
+            }
+            finally
+            {
+               if (null != statement)
+               {
+                  try
+                  {
+                     statement.close();
+                  }
+                  catch (Exception e){}
+               }
+            }
+            if (created)
+            {
+               try
+               {
+                  statement = connection.createStatement();
+                  for (String sql : INSERT_STATEMENT)
+                  {
+                     statement.addBatch(sql);
+                  }
+                  int[] batchReturnCodes = statement.executeBatch();
+                  boolean insertedErrors = false ; 
+                  for (int code : batchReturnCodes)
+                  {
+                     if (1 != code)
+                     {// record not inserted
+                        result = FAIL;
+                        insertedErrors = true;
+                        break;
+                     }
+                  }
+                  inserted = !insertedErrors;
+               }
+               catch (Exception e)
+               {
+                  log(e.getMessage(), e);
+                  log(e.getCause().getMessage());
+               }
+               finally
+               {
+                  if (null != statement)
+                  {
+                     try
+                     {
+                        statement.close();
+                     }
+                     catch (Exception e){}
+                  }
+               }
+            }
+         }
+      }
+      catch (Exception e)
+      {
+         getServletContext().log( e.getMessage(), e);
+         resp.setStatus(HttpServletResponse.SC_OK);
+      }
+      finally
+      {
+         try
+         {
+            if (null != connection) connection.close();
+         }
+         catch (Exception e) {}
+         try
+         {
+            if (null != userTransaction)
+            {
+               if (true == created && true == inserted )
+               {
+                  userTransaction.commit();
+               }
+               else 
+               {
+                  userTransaction.rollback();
+               }
+            }
+         }
+         catch (Exception e) {}
+      }
+      if (created && inserted)
+      {
+         result = SUCCESS;
+         resp.setStatus(HttpServletResponse.SC_OK);
+      }
+      else
+      {
+         resp.setStatus(500);
+      }
+      
+      resp.getWriter().write(result);
+   }
+   
+   @Override
+   protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+         throws ServletException, IOException
+   {
+      doGet(req, resp);
+   }
+   
+}

Modified: projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/http/HttpConnectionServlet.java
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/http/HttpConnectionServlet.java	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/java/org/jboss/jca/performance/servlet/http/HttpConnectionServlet.java	2010-11-19 08:00:34 UTC (rev 109386)
@@ -55,8 +55,8 @@
    public static final String VIEW = "/connection.jsp";
    public static final String FAIL = "FAIL" ;  
    public static final String SUCCESS = "SUCCESS" ;
-   public static final String SELECT_STATEMENT = "SELECT firstname FROM Customer WHERE id=1;";
-   public static final String UPDATE_STATEMENT = "UPDATE Customer SET firstname=? WHERE id=1;";
+   public static final String SELECT_STATEMENT = "SELECT firstname FROM Customer WHERE id=0;";
+   public static final String UPDATE_STATEMENT = "UPDATE Customer SET firstname=? WHERE id=0;";
    private Context context = null;
 
    @Override

Added: projects/jboss-jca/branches/performance/jmeter/src/main/resources/Monitor-Test-Plan.jmx
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/Monitor-Test-Plan.jmx	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/Monitor-Test-Plan.jmx	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jmeterTestPlan version="1.2" properties="2.1">
+  <hashTree>
+    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Monitor Test Plan" enabled="true">
+      <stringProp name="TestPlan.comments"></stringProp>
+      <boolProp name="TestPlan.functional_mode">false</boolProp>
+      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
+      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
+        <collectionProp name="Arguments.arguments"/>
+      </elementProp>
+      <stringProp name="TestPlan.user_define_classpath"></stringProp>
+    </TestPlan>
+    <hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="JMX Thread Group" enabled="true">
+        <stringProp name="ThreadGroup.on_sample_error">stopthread</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <intProp name="LoopController.loops">-1</intProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1288346092000</longProp>
+        <longProp name="ThreadGroup.end_time">1288346092000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree>
+        <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="JMX Sampler for Tx Rate" enabled="true">
+          <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
+            <collectionProp name="Arguments.arguments">
+              <elementProp name="JMX_HOST" elementType="Argument">
+                <stringProp name="Argument.name">JMX_HOST</stringProp>
+                <stringProp name="Argument.value">localhost</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+              <elementProp name="JMX_PORT" elementType="Argument">
+                <stringProp name="Argument.name">JMX_PORT</stringProp>
+                <stringProp name="Argument.value">9999</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+              <elementProp name="JMXBEAN_NAME" elementType="Argument">
+                <stringProp name="Argument.name">JMXBEAN_NAME</stringProp>
+                <stringProp name="Argument.value">org.jboss.byteman.sample.jmx:type=PeriodicStats</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+              <elementProp name="JMXBEAN_STATS_RATE_ATTR" elementType="Argument">
+                <stringProp name="Argument.name">JMXBEAN_STATS_RATE_ATTR</stringProp>
+                <stringProp name="Argument.value">transaction commits : rate</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+              <elementProp name="SAMPLER_LABEL" elementType="Argument">
+                <stringProp name="Argument.name">SAMPLER_LABEL</stringProp>
+                <stringProp name="Argument.value">Tx rate sampler</stringProp>
+                <stringProp name="Argument.metadata">=</stringProp>
+              </elementProp>
+            </collectionProp>
+          </elementProp>
+          <stringProp name="classname">org.apache.jmeter.protocol.java.test.jmx.IronJacamarJMXSampler</stringProp>
+        </JavaSampler>
+        <hashTree/>
+        <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
+          <stringProp name="ConstantTimer.delay">1000</stringProp>
+          <stringProp name="TestPlan.comments">This timer sets the frequency the JMXBean is called.</stringProp>
+        </ConstantTimer>
+        <hashTree/>
+        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Results" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+          <boolProp name="ResultCollector.success_only_logging">true</boolProp>
+        </ResultCollector>
+        <hashTree/>
+      </hashTree>
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="CPU Thread Group" enabled="false">
+        <stringProp name="ThreadGroup.on_sample_error">stopthread</stringProp>
+        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+          <boolProp name="LoopController.continue_forever">false</boolProp>
+          <stringProp name="LoopController.loops">1</stringProp>
+        </elementProp>
+        <stringProp name="ThreadGroup.num_threads">1</stringProp>
+        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+        <longProp name="ThreadGroup.start_time">1288967147000</longProp>
+        <longProp name="ThreadGroup.end_time">1288967147000</longProp>
+        <boolProp name="ThreadGroup.scheduler">false</boolProp>
+        <stringProp name="ThreadGroup.duration"></stringProp>
+        <stringProp name="ThreadGroup.delay"></stringProp>
+      </ThreadGroup>
+      <hashTree/>
+    </hashTree>
+  </hashTree>
+</jmeterTestPlan>

Modified: projects/jboss-jca/branches/performance/jmeter/src/main/resources/WEB-INF/web.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/WEB-INF/web.xml	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/WEB-INF/web.xml	2010-11-19 08:00:34 UTC (rev 109386)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-   <!--
+<!--
       * JBoss, Home of Professional Open Source. * Copyright 2008, Red
       Hat Middleware LLC, and individual contributors * as indicated by
       the @author tags. See the copyright.txt file in the * distribution
@@ -18,27 +18,41 @@
       the FSF site: http://www.fsf.org.
    -->
 <web-app id="WebApp_ID" version="2.5"
-   xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-   <display-name>jbjcaweb</display-name>
-   <servlet>
-      <display-name>JCAConnection</display-name>
-      <servlet-name>HttpConnectionServlet</servlet-name>
-      <servlet-class>org.jboss.jca.performance.servlet.http.HttpConnectionServlet</servlet-class>
-      <load-on-startup>1</load-on-startup>
-   </servlet>
-   <servlet-mapping>
-      <servlet-name>HttpConnectionServlet</servlet-name>
-      <url-pattern>/jcaconn</url-pattern>
-   </servlet-mapping>
-   <resource-env-ref>
-      <description>HSQLDB Data Source used by the connection servlet.</description>
-      <resource-env-ref-name>SampleDS</resource-env-ref-name>
-      <resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
-   </resource-env-ref>
-   <resource-env-ref>
-      <description>UserTransaction used by the connection servlet.</description>
-      <resource-env-ref-name>UserTransaction</resource-env-ref-name>
-      <resource-env-ref-type>javax.transaction.UserTransaction</resource-env-ref-type>
-   </resource-env-ref>
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>jbjcaweb</display-name>
+ <servlet>
+  <display-name>JCAConnection</display-name>
+  <servlet-name>HttpConnectionServlet</servlet-name>
+  <servlet-class>org.jboss.jca.performance.servlet.http.HttpConnectionServlet</servlet-class>
+  <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+  <display-name>DataLoader</display-name>
+  <servlet-name>DataLoader</servlet-name>
+  <servlet-class>org.jboss.jca.performance.servlet.data.LoadData</servlet-class>
+  <load-on-startup>2</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+  <servlet-name>HttpConnectionServlet</servlet-name>
+  <url-pattern>/jcaconn</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+  <servlet-name>DataLoader</servlet-name>
+  <url-pattern>/load-data</url-pattern>
+ </servlet-mapping>
+ <session-config>
+  <!-- Set the timeout very low to prevent load tests causing OOME. -->
+  <session-timeout>3</session-timeout>
+ </session-config>
+ <resource-env-ref>
+  <description>HSQLDB Data Source used by the connection servlet.</description>
+  <resource-env-ref-name>SampleDS</resource-env-ref-name>
+  <resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
+ </resource-env-ref>
+ <resource-env-ref>
+  <description>UserTransaction used by the connection servlet.</description>
+  <resource-env-ref-name>UserTransaction</resource-env-ref-name>
+  <resource-env-ref-type>javax.transaction.UserTransaction</resource-env-ref-type>
+ </resource-env-ref>
 </web-app>

Added: projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/CommitStatistics.txt
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/CommitStatistics.txt	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/CommitStatistics.txt	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,38 @@
+########################################################################
+# JBoss, Home of Professional Open Source
+# Copyright 2010, Red Hat Middleware and individual contributors
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+########################################################################
+
+HELPER org.jboss.byteman.sample.helper.JMXHelper
+
+# this rule is triggered when the periodic helper thread starts
+# it returns a KeyInfo object identifying the stats counters
+# updated by rules in this rule set
+
+# Commit stats rule.
+RULE CommitStatistics
+CLASS org.h2.engine.Session
+METHOD commit(boolean)
+AT EXIT
+IF TRUE
+DO incrementCounter("transaction commits") 
+ENDRULE
+

Added: projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/ModifyHelperRMIConfiguration.txt	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,33 @@
+########################################################################
+# JBoss, Home of Professional Open Source
+# Copyright 2010, Red Hat Middleware and individual contributors
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+########################################################################
+
+# this rule changes the default field member on JMXHelper with a new
+# value of true
+
+RULE enable-rmi-server
+CLASS JMXHelper
+METHOD rmiServerRequired()
+AT EXIT
+IF TRUE
+DO RETURN TRUE
+ENDRULE

Added: projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/RuleHelper.txt
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/RuleHelper.txt	                        (rev 0)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/byteman/RuleHelper.txt	2010-11-19 08:00:34 UTC (rev 109386)
@@ -0,0 +1,32 @@
+########################################################################
+# JBoss, Home of Professional Open Source
+# Copyright 2010, Red Hat Middleware and individual contributors
+# by the @authors tag. See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+#
+########################################################################
+
+RULE return-key-info
+CLASS JMXHelper
+METHOD keyInfo()  
+BIND keyInfo : KeyInfo = new KeyInfo("JVM Statistics in a Dynamic MBean")
+IF TRUE
+DO keyInfo.addKey("transaction commits", KeyInfo.KEY_TYPE_RATE, "Tx per second");
+   keyInfo.addKey("transaction commits", KeyInfo.KEY_TYPE_CUMULATIVE, "Total tx");
+   RETURN keyInfo
+ENDRULE

Modified: projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/jca-local-h2-ds.xml	2010-11-19 08:00:34 UTC (rev 109386)
@@ -1,27 +1,52 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
 <datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://www.jboss.org/jee/schema/ironjacamar/datasources_1_0.xsd">
   <datasource jndi-name="SampleDS" pool-name="SampleDS">
-    <connection-url>jdbc:hsqldb:hsql://localhost</connection-url>
+    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
     <!-- The driver class -->
-    <driver-class>org.hsqldb.jdbcDriver</driver-class>
+    <driver-class>org.h2.Driver</driver-class>
     <pool>
       <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
       <min-pool-size>5</min-pool-size>
       <!-- The maximum connections in a pool/sub-pool -->
-      <max-pool-size>20</max-pool-size>
+      <max-pool-size>300</max-pool-size>
       <!-- The login and password -->
     </pool>
     <security>
       <user-name>sa</user-name>
       <password></password>
-    </security> 
+    </security>
+    <validation>
+       <valid-connection-checker-class-name>org.jboss.jca.adapters.jdbc.ValidConnectionChecker</valid-connection-checker-class-name>
+    </validation>
     <time-out>
       <!-- The time before an unused connection is destroyed -->
       <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
       <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
       <idle-timeout-minutes>0</idle-timeout-minutes>
     </time-out>
+    
     <statement>
       <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature 
         that should be turned off in production 
@@ -30,6 +55,7 @@
       <!-- HSQL DB benefits from prepared statement caching -->
       <prepared-statement-cache-size>32</prepared-statement-cache-size>
     </statement>
+   
     
   </datasource>
 </datasources>
\ No newline at end of file

Modified: projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Direct-JDBC.jmx
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Direct-JDBC.jmx	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Direct-JDBC.jmx	2010-11-19 08:00:34 UTC (rev 109386)
@@ -12,12 +12,12 @@
     </TestPlan>
     <hashTree>
       <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="JDBC Users" enabled="true">
-        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+        <stringProp name="ThreadGroup.on_sample_error">stopthread</stringProp>
         <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
           <boolProp name="LoopController.continue_forever">false</boolProp>
-          <stringProp name="LoopController.loops">1000000</stringProp>
+          <stringProp name="LoopController.loops">10000</stringProp>
         </elementProp>
-        <stringProp name="ThreadGroup.num_threads">10</stringProp>
+        <stringProp name="ThreadGroup.num_threads">20</stringProp>
         <stringProp name="ThreadGroup.ramp_time">10</stringProp>
         <longProp name="ThreadGroup.start_time">1286896125000</longProp>
         <longProp name="ThreadGroup.end_time">1286896125000</longProp>
@@ -27,39 +27,213 @@
       </ThreadGroup>
       <hashTree>
         <JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="JDBC Connection Configuration" enabled="true">
-          <stringProp name="dataSource">HSQLDB</stringProp>
-          <stringProp name="poolMax">20</stringProp>
+          <stringProp name="dataSource">HSQLDB-Pool1</stringProp>
+          <stringProp name="poolMax">5000</stringProp>
           <stringProp name="timeout">5000</stringProp>
           <stringProp name="trimInterval">6000</stringProp>
-          <boolProp name="autocommit">true</boolProp>
+          <boolProp name="autocommit">false</boolProp>
           <boolProp name="keepAlive">true</boolProp>
-          <stringProp name="connectionAge"></stringProp>
-          <stringProp name="checkQuery">select 1</stringProp>
+          <stringProp name="connectionAge">4000</stringProp>
+          <stringProp name="checkQuery">SELECT 1 FROM Customer WHERE ID=1;</stringProp>
           <stringProp name="dbUrl">jdbc:hsqldb:hsql://localhost</stringProp>
           <stringProp name="driver">org.hsqldb.jdbcDriver</stringProp>
           <stringProp name="username">sa</stringProp>
           <stringProp name="password"></stringProp>
         </JDBCDataSource>
         <hashTree/>
-        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Customer JDBC Request" enabled="true">
-          <stringProp name="dataSource">HSQLDB</stringProp>
-          <stringProp name="queryType">Prepared Select Statement</stringProp>
-          <stringProp name="query">SELECT * FROM Customer</stringProp>
-          <stringProp name="queryArguments"></stringProp>
-          <stringProp name="queryArgumentsTypes"></stringProp>
-          <stringProp name="variableNames"></stringProp>
-        </JDBCSampler>
+        <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Transaction Controller - Unit of Work" enabled="true">
+          <boolProp name="TransactionController.parent">true</boolProp>
+        </TransactionController>
+        <hashTree>
+          <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="PREPARED SELECT Customer JDBC Request" enabled="true">
+            <stringProp name="dataSource">HSQLDB-Pool1</stringProp>
+            <stringProp name="queryType">Prepared Select Statement</stringProp>
+            <stringProp name="query">SELECT FirstName FROM Customer WHERE ID=?;</stringProp>
+            <stringProp name="queryArguments">1</stringProp>
+            <stringProp name="queryArgumentsTypes">INTEGER</stringProp>
+            <stringProp name="variableNames"></stringProp>
+          </JDBCSampler>
+          <hashTree/>
+          <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="UPDATE Customer JDBC Request" enabled="true">
+            <stringProp name="dataSource">HSQLDB-Pool1</stringProp>
+            <stringProp name="queryType">Prepared Update Statement</stringProp>
+            <stringProp name="query">UPDATE Customer SET firstname=? WHERE id=?;</stringProp>
+            <stringProp name="queryArguments">Jeremy,1</stringProp>
+            <stringProp name="queryArgumentsTypes">VARCHAR,INTEGER</stringProp>
+            <stringProp name="variableNames"></stringProp>
+          </JDBCSampler>
+          <hashTree/>
+          <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Commit Transaction JDBC Request" enabled="true">
+            <stringProp name="dataSource">HSQLDB-Pool1</stringProp>
+            <stringProp name="queryType">Commit</stringProp>
+            <stringProp name="query"></stringProp>
+            <stringProp name="queryArguments"></stringProp>
+            <stringProp name="queryArgumentsTypes"></stringProp>
+            <stringProp name="variableNames"></stringProp>
+          </JDBCSampler>
+          <hashTree/>
+          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Begin Transaction Java Request" enabled="false">
+            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
+              <collectionProp name="Arguments.arguments">
+                <elementProp name="Sleep_Time" elementType="Argument">
+                  <stringProp name="Argument.name">Sleep_Time</stringProp>
+                  <stringProp name="Argument.value">100</stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="Sleep_Mask" elementType="Argument">
+                  <stringProp name="Argument.name">Sleep_Mask</stringProp>
+                  <stringProp name="Argument.value">0xFF</stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="Label" elementType="Argument">
+                  <stringProp name="Argument.name">Label</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="ResponseCode" elementType="Argument">
+                  <stringProp name="Argument.name">ResponseCode</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="ResponseMessage" elementType="Argument">
+                  <stringProp name="Argument.name">ResponseMessage</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="Status" elementType="Argument">
+                  <stringProp name="Argument.name">Status</stringProp>
+                  <stringProp name="Argument.value">OK</stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="SamplerData" elementType="Argument">
+                  <stringProp name="Argument.name">SamplerData</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="ResultData" elementType="Argument">
+                  <stringProp name="Argument.name">ResultData</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+              </collectionProp>
+            </elementProp>
+            <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>
+          </JavaSampler>
+          <hashTree/>
+          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Java Request" enabled="false">
+            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
+              <collectionProp name="Arguments.arguments">
+                <elementProp name="Sleep_Time" elementType="Argument">
+                  <stringProp name="Argument.name">Sleep_Time</stringProp>
+                  <stringProp name="Argument.value">100</stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="Sleep_Mask" elementType="Argument">
+                  <stringProp name="Argument.name">Sleep_Mask</stringProp>
+                  <stringProp name="Argument.value">0xFF</stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="Label" elementType="Argument">
+                  <stringProp name="Argument.name">Label</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="ResponseCode" elementType="Argument">
+                  <stringProp name="Argument.name">ResponseCode</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="ResponseMessage" elementType="Argument">
+                  <stringProp name="Argument.name">ResponseMessage</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="Status" elementType="Argument">
+                  <stringProp name="Argument.name">Status</stringProp>
+                  <stringProp name="Argument.value">OK</stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="SamplerData" elementType="Argument">
+                  <stringProp name="Argument.name">SamplerData</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+                <elementProp name="ResultData" elementType="Argument">
+                  <stringProp name="Argument.name">ResultData</stringProp>
+                  <stringProp name="Argument.value"></stringProp>
+                  <stringProp name="Argument.metadata">=</stringProp>
+                </elementProp>
+              </collectionProp>
+            </elementProp>
+            <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>
+          </JavaSampler>
+          <hashTree/>
+        </hashTree>
+        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Results" enabled="false">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
         <hashTree/>
-        <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="Product JDBC Request" enabled="true">
-          <stringProp name="dataSource">HSQLDB</stringProp>
-          <stringProp name="queryType">Prepared Select Statement</stringProp>
-          <stringProp name="query">SELECT * FROM Product;</stringProp>
-          <stringProp name="queryArguments"></stringProp>
-          <stringProp name="queryArgumentsTypes"></stringProp>
-          <stringProp name="variableNames"></stringProp>
-        </JDBCSampler>
+        <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
         <hashTree/>
-        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Results" enabled="true">
+        <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="false">
           <boolProp name="ResultCollector.error_logging">false</boolProp>
           <objProp>
             <name>saveConfig</name>
@@ -88,9 +262,105 @@
               <bytes>true</bytes>
             </value>
           </objProp>
+          <stringProp name="filename">results-table.csv</stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="StatGraphVisualizer" testclass="ResultCollector" testname="Aggregate Graph" enabled="false">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
           <stringProp name="filename"></stringProp>
         </ResultCollector>
         <hashTree/>
+        <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="false">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
+        <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
+          <boolProp name="ResultCollector.error_logging">false</boolProp>
+          <objProp>
+            <name>saveConfig</name>
+            <value class="SampleSaveConfiguration">
+              <time>true</time>
+              <latency>true</latency>
+              <timestamp>true</timestamp>
+              <success>true</success>
+              <label>true</label>
+              <code>true</code>
+              <message>true</message>
+              <threadName>true</threadName>
+              <dataType>true</dataType>
+              <encoding>false</encoding>
+              <assertions>true</assertions>
+              <subresults>true</subresults>
+              <responseData>false</responseData>
+              <samplerData>false</samplerData>
+              <xml>true</xml>
+              <fieldNames>false</fieldNames>
+              <responseHeaders>false</responseHeaders>
+              <requestHeaders>false</requestHeaders>
+              <responseDataOnError>false</responseDataOnError>
+              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+              <assertionsResultsToSave>0</assertionsResultsToSave>
+              <bytes>true</bytes>
+            </value>
+          </objProp>
+          <stringProp name="filename"></stringProp>
+        </ResultCollector>
+        <hashTree/>
       </hashTree>
     </hashTree>
   </hashTree>

Modified: projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Http-Test.jmx
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Http-Test.jmx	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/jmeter/src/main/resources/jmeter/Http-Test.jmx	2010-11-19 08:00:34 UTC (rev 109386)
@@ -11,13 +11,13 @@
       <stringProp name="TestPlan.user_define_classpath"></stringProp>
     </TestPlan>
     <hashTree>
-      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Concurrent Wokr Group" enabled="true">
+      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Concurrent Work Group" enabled="true">
         <stringProp name="ThreadGroup.on_sample_error">stopthread</stringProp>
         <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
           <boolProp name="LoopController.continue_forever">false</boolProp>
-          <stringProp name="LoopController.loops">100000</stringProp>
+          <stringProp name="LoopController.loops">80000</stringProp>
         </elementProp>
-        <stringProp name="ThreadGroup.num_threads">20</stringProp>
+        <stringProp name="ThreadGroup.num_threads">30</stringProp>
         <stringProp name="ThreadGroup.ramp_time">10</stringProp>
         <longProp name="ThreadGroup.start_time">1286896125000</longProp>
         <longProp name="ThreadGroup.end_time">1286896125000</longProp>
@@ -39,6 +39,14 @@
           <stringProp name="HTTPSampler.path"></stringProp>
         </ConfigTestElement>
         <hashTree/>
+        <URLRewritingModifier guiclass="URLRewritingModifierGui" testclass="URLRewritingModifier" testname="HTTP URL Re-writing Modifier" enabled="true">
+          <stringProp name="argument_name">JSESSIONID</stringProp>
+          <boolProp name="path_extension">false</boolProp>
+          <boolProp name="path_extension_no_equals">false</boolProp>
+          <boolProp name="path_extension_no_questionmark">false</boolProp>
+          <boolProp name="cache_value">true</boolProp>
+        </URLRewritingModifier>
+        <hashTree/>
         <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request" enabled="true">
           <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
             <collectionProp name="Arguments.arguments"/>
@@ -98,7 +106,7 @@
               <bytes>true</bytes>
             </value>
           </objProp>
-          <stringProp name="filename">results.csv</stringProp>
+          <stringProp name="filename"></stringProp>
           <boolProp name="ResultCollector.success_only_logging">true</boolProp>
         </ResultCollector>
         <hashTree/>

Modified: projects/jboss-jca/branches/performance/pojos/src/main/java/org/jboss/jca/performance/pojos/DatabaseTester.java
===================================================================
--- projects/jboss-jca/branches/performance/pojos/src/main/java/org/jboss/jca/performance/pojos/DatabaseTester.java	2010-11-19 06:04:14 UTC (rev 109385)
+++ projects/jboss-jca/branches/performance/pojos/src/main/java/org/jboss/jca/performance/pojos/DatabaseTester.java	2010-11-19 08:00:34 UTC (rev 109386)
@@ -179,7 +179,7 @@
 
       long elapsed = end - start;
 
-      if (elapsed < 0)
+      if (elapsed <= 0)
          elapsed = 1;
 
       log.info("Took: " + elapsed + " ms");
@@ -234,7 +234,8 @@
             {
                for (String sqlStatement : sqls)
                {
-                  log.fine("Executing: " + sqlStatement);
+                  if (log.isLoggable(Level.FINE))
+                     log.fine("Executing: " + sqlStatement);
 
                   try
                   {

Added: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-install.jar
===================================================================
(Binary files differ)


Property changes on: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-install.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-sample.jar
===================================================================
(Binary files differ)


Property changes on: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-sample.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-submit.jar
===================================================================
(Binary files differ)


Property changes on: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman-submit.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman.jar
===================================================================
(Binary files differ)


Property changes on: projects/jboss-jca/branches/performance/tools/byteman/lib/byteman.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/jboss-jca/branches/performance/tools/h2/lib/h2-1.2.145.jar
===================================================================
(Binary files differ)


Property changes on: projects/jboss-jca/branches/performance/tools/h2/lib/h2-1.2.145.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: projects/jboss-jca/branches/performance/tools/jmeter/lib/ext/ApacheJMeter_jdbc.jar
===================================================================
(Binary files differ)



More information about the jboss-cvs-commits mailing list