[jboss-svn-commits] JBL Code SVN: r36963 - in labs/jbosstm/trunk: ArjunaCore/arjuna and 6 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 21 06:07:59 EDT 2011


Author: mmusgrov
Date: 2011-04-21 06:07:58 -0400 (Thu, 21 Apr 2011)
New Revision: 36963

Added:
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.form
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.java
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfPlugin.java
   labs/jbosstm/trunk/ext/jcommon-1.0.10.jar
   labs/jbosstm/trunk/ext/jfreechart-1.0.6.jar
   labs/jbosstm/trunk/ext/orson-0.5.0.jar
Modified:
   labs/jbosstm/trunk/
   labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml
   labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/util/JMXServer.java
   labs/jbosstm/trunk/ArjunaJTS/INSTALL
   labs/jbosstm/trunk/maven/pom-template.xml
   labs/jbosstm/trunk/sharedbuild.xml
Log:
[JBTM-49] Add support for a jconsole plugin for graphing statistics


Property changes on: labs/jbosstm/trunk
___________________________________________________________________
Modified: svn:ignore
   - .project
.settings
svnignores.txt
build
install
idl-compiler.out
idl-compiler.err

   + .project
.settings
svnignores.txt
build
install
idl-compiler.out
idl-compiler.err
.sharedbuild.xml.swp


Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml	2011-04-21 09:54:27 UTC (rev 36962)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/build.xml	2011-04-21 10:07:58 UTC (rev 36963)
@@ -43,6 +43,19 @@
         </compile-tests.macro>
     </target>
 
+    <target name="compile">
+        <compile.macro>
+            <additional.classpath>
+                <!-- jconsole performance graphing support
+                     -->
+                <fileset dir="${sharedbuild.base.dir}/ext/" includes="orson-0.5.0.jar"/>
+                <fileset dir="${sharedbuild.base.dir}/ext/" includes="jcommon-1.0.10.jar"/>
+                <fileset dir="${sharedbuild.base.dir}/ext/" includes="jfreechart-1.0.6.jar"/>
+                <fileset dir="${java.home}/../lib/" includes="jconsole.jar"/>
+            </additional.classpath>
+        </compile.macro>
+    </target>
+
 	<!--
 		run tests that match a given pattern, for example
 		ant testone -DONECLASS="**/*ObjectStoreAPIJMXTest.java"

Modified: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/util/JMXServer.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/util/JMXServer.java	2011-04-21 09:54:27 UTC (rev 36962)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/osb/util/JMXServer.java	2011-04-21 10:07:58 UTC (rev 36963)
@@ -101,7 +101,9 @@
 		ObjectInstance oi = null;
 
 		try {
-			tsLogger.i18NLogger.info_tools_osb_util_JMXServer_m_1(name);
+			if (tsLogger.logger.isDebugEnabled())
+				tsLogger.logger.debug("registering bean " + name);
+			//tsLogger.i18NLogger.info_tools_osb_util_JMXServer_m_1(name);
 			oi = getServer().registerMBean(bean, new ObjectName(name));
 		} catch (InstanceAlreadyExistsException e) {
 			tsLogger.i18NLogger.info_tools_osb_util_JMXServer_m_2(name);

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.form
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.form	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.form	2011-04-21 10:07:58 UTC (rev 36963)
@@ -0,0 +1,434 @@
+<?xml version="1.1" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <NonVisualComponents>
+    <Component class="javax.swing.ButtonGroup" name="seriesSelectBtnGroup">
+    </Component>
+    <Component class="javax.swing.ButtonGroup" name="configBtnGroup">
+    </Component>
+  </NonVisualComponents>
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-23,0,0,1,-56"/>
+  </AuxValues>
+
+  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout"/>
+  <SubComponents>
+    <Container class="javax.swing.JPanel" name="jPanel1">
+
+      <Layout>
+        <DimensionLayout dim="0">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" attributes="0">
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Component id="periodSelectPanel" alignment="0" max="32767" attributes="0"/>
+                      <Component id="chartsPane" alignment="1" pref="430" max="32767" attributes="0"/>
+                      <Component id="btnPanel" alignment="0" max="32767" attributes="0"/>
+                  </Group>
+                  <EmptySpace max="-2" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+        <DimensionLayout dim="1">
+          <Group type="103" groupAlignment="0" attributes="0">
+              <Group type="102" alignment="0" attributes="0">
+                  <Component id="chartsPane" min="-2" pref="278" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="periodSelectPanel" min="-2" pref="44" max="-2" attributes="0"/>
+                  <EmptySpace max="-2" attributes="0"/>
+                  <Component id="btnPanel" min="-2" max="-2" attributes="0"/>
+                  <EmptySpace pref="14" max="32767" attributes="0"/>
+              </Group>
+          </Group>
+        </DimensionLayout>
+      </Layout>
+      <SubComponents>
+        <Container class="javax.swing.JPanel" name="btnPanel">
+
+          <Layout>
+            <DimensionLayout dim="0">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" alignment="0" attributes="0">
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Component id="inFlightTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                                  <Component id="allTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                                  <Component id="abortedTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                                  <Component id="committedTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                              </Group>
+                              <EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Component id="nestedTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                                  <Component id="heuristicTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                                  <Component id="timedoutTxnBtn" alignment="0" min="-2" max="-2" attributes="0"/>
+                              </Group>
+                          </Group>
+                          <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace pref="188" max="32767" attributes="0"/>
+                  </Group>
+              </Group>
+            </DimensionLayout>
+            <DimensionLayout dim="1">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" alignment="1" attributes="0">
+                      <EmptySpace min="-2" max="-2" attributes="0"/>
+                      <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="32767" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" alignment="0" attributes="0">
+                              <Component id="heuristicTxnBtn" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Component id="nestedTxnBtn" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Component id="timedoutTxnBtn" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <Group type="102" alignment="0" attributes="0">
+                              <Component id="allTxnBtn" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Component id="inFlightTxnBtn" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Component id="committedTxnBtn" min="-2" max="-2" attributes="0"/>
+                              <EmptySpace max="-2" attributes="0"/>
+                              <Component id="abortedTxnBtn" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                      </Group>
+                  </Group>
+              </Group>
+            </DimensionLayout>
+          </Layout>
+          <SubComponents>
+            <Component class="javax.swing.JLabel" name="jLabel1">
+              <Properties>
+                <Property name="text" type="java.lang.String" value="Select Series"/>
+              </Properties>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="allTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="Transactions"/>
+                <Property name="toolTipText" type="java.lang.String" value="Show all transactions"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="allTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="inFlightTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="In Flight"/>
+                <Property name="toolTipText" type="java.lang.String" value="Show transactions that have not yet been committed/aborted"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="inFlightTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="committedTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="Committed"/>
+                <Property name="toolTipText" type="java.lang.String" value="Show successfully committed transactions"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="committedTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="abortedTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="Aborted"/>
+                <Property name="toolTipText" type="java.lang.String" value="Show stats for rolled back transactions"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="abortedTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="heuristicTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="Heuristics"/>
+                <Property name="toolTipText" type="java.lang.String" value="Show stats for transactions that terminated with a heuristic outcome"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="heuristicTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="nestedTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="Nested"/>
+                <Property name="toolTipText" type="java.lang.String" value="Stats for nested transactions"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nestedTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+            <Component class="javax.swing.JRadioButton" name="timedoutTxnBtn">
+              <Properties>
+                <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+                  <ComponentRef name="seriesSelectBtnGroup"/>
+                </Property>
+                <Property name="text" type="java.lang.String" value="Timed Out"/>
+                <Property name="toolTipText" type="java.lang.String" value="Stats for transactions which exceeded there time to live"/>
+              </Properties>
+              <Events>
+                <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="timedoutTxnBtnActionPerformed"/>
+              </Events>
+            </Component>
+          </SubComponents>
+        </Container>
+        <Container class="javax.swing.JTabbedPane" name="chartsPane">
+          <Events>
+            <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="chartsPaneStateChanged"/>
+          </Events>
+
+          <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
+          <SubComponents>
+            <Container class="javax.swing.JPanel" name="configTab">
+              <Constraints>
+                <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+                  <JTabbedPaneConstraints tabName="Settings">
+                    <Property name="tabTitle" type="java.lang.String" value="Settings"/>
+                  </JTabbedPaneConstraints>
+                </Constraint>
+              </Constraints>
+
+              <Layout>
+                <DimensionLayout dim="0">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Group type="102" attributes="0">
+                          <Group type="103" groupAlignment="0" attributes="0">
+                              <Group type="102" alignment="0" attributes="0">
+                                  <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
+                                  <Group type="103" groupAlignment="0" attributes="0">
+                                      <Component id="enableStatsCB" alignment="0" min="-2" max="-2" attributes="0"/>
+                                      <Group type="102" alignment="1" attributes="0">
+                                          <Group type="103" groupAlignment="1" attributes="0">
+                                              <Component id="resetStatsBtn" alignment="0" pref="246" max="32767" attributes="1"/>
+                                              <Group type="102" alignment="1" attributes="0">
+                                                  <Component id="pollIntervalBtn" pref="120" max="32767" attributes="1"/>
+                                                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                                                  <Component id="pollIntervalSpinner" min="-2" pref="114" max="-2" attributes="0"/>
+                                              </Group>
+                                          </Group>
+                                          <EmptySpace min="-2" pref="152" max="-2" attributes="0"/>
+                                      </Group>
+                                  </Group>
+                              </Group>
+                              <Group type="102" alignment="0" attributes="0">
+                                  <EmptySpace min="-2" pref="22" max="-2" attributes="0"/>
+                                  <Component id="sampleSizeBtn1" min="-2" max="-2" attributes="1"/>
+                                  <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                                  <Component id="sampleSizeSpinner" min="-2" pref="114" max="-2" attributes="0"/>
+                              </Group>
+                          </Group>
+                          <EmptySpace max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+                </DimensionLayout>
+                <DimensionLayout dim="1">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Group type="102" alignment="0" attributes="0">
+                          <EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
+                          <Component id="enableStatsCB" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace max="-2" attributes="0"/>
+                          <Group type="103" groupAlignment="3" attributes="0">
+                              <Component id="sampleSizeBtn1" alignment="3" min="-2" max="-2" attributes="0"/>
+                              <Component id="sampleSizeSpinner" alignment="3" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <EmptySpace max="-2" attributes="0"/>
+                          <Group type="103" groupAlignment="3" attributes="0">
+                              <Component id="pollIntervalBtn" alignment="3" min="-2" max="-2" attributes="0"/>
+                              <Component id="pollIntervalSpinner" alignment="3" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <EmptySpace max="-2" attributes="0"/>
+                          <Component id="resetStatsBtn" min="-2" max="-2" attributes="0"/>
+                          <EmptySpace pref="73" max="32767" attributes="0"/>
+                      </Group>
+                  </Group>
+                </DimensionLayout>
+              </Layout>
+              <SubComponents>
+                <Component class="javax.swing.JButton" name="resetStatsBtn">
+                  <Properties>
+                    <Property name="text" type="java.lang.String" value="Reset Stats"/>
+                  </Properties>
+                  <Events>
+                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="resetStatsBtnActionPerformed"/>
+                  </Events>
+                </Component>
+                <Component class="javax.swing.JSpinner" name="pollIntervalSpinner">
+                  <Properties>
+                    <Property name="toolTipText" type="java.lang.String" value="Change polling interval (in seconds)"/>
+                  </Properties>
+                </Component>
+                <Component class="javax.swing.JButton" name="pollIntervalBtn">
+                  <Properties>
+                    <Property name="text" type="java.lang.String" value="Set Poll Interval"/>
+                    <Property name="toolTipText" type="java.lang.String" value="Change polling interval (in seconds)"/>
+                  </Properties>
+                  <Events>
+                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pollIntervalBtnActionPerformed"/>
+                  </Events>
+                </Component>
+                <Component class="javax.swing.JCheckBox" name="enableStatsCB">
+                  <Properties>
+                    <Property name="text" type="java.lang.String" value="Enable Statistics"/>
+                    <Property name="toolTipText" type="java.lang.String" value="Stop data collection by disabling the stats MBean in the target JVM"/>
+                  </Properties>
+                  <Events>
+                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="enableStatsCBActionPerformed"/>
+                  </Events>
+                </Component>
+                <Component class="javax.swing.JButton" name="sampleSizeBtn1">
+                  <Properties>
+                    <Property name="text" type="java.lang.String" value="Set Sample Size"/>
+                    <Property name="toolTipText" type="java.lang.String" value="Change polling interval (in seconds)"/>
+                  </Properties>
+                  <Events>
+                    <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sampleSizeBtn1ActionPerformed"/>
+                  </Events>
+                </Component>
+                <Component class="javax.swing.JSpinner" name="sampleSizeSpinner">
+                  <Properties>
+                    <Property name="toolTipText" type="java.lang.String" value="Change Number of Data Samples "/>
+                  </Properties>
+                </Component>
+              </SubComponents>
+            </Container>
+            <Container class="org.jfree.beans.JLineChart" name="chart1">
+              <Properties>
+                <Property name="xAxisLabel" type="java.lang.String" value="Time of Day"/>
+                <Property name="xAxisScale" type="org.jfree.beans.AxisScale" editor="org.jfree.beans.editors.AxisScaleEditor">
+                  <SerializedValue value="-84,-19,0,5,115,114,0,25,111,114,103,46,106,102,114,101,101,46,98,101,97,110,115,46,65,120,105,115,83,99,97,108,101,110,85,102,59,126,70,-97,10,2,0,1,76,0,4,110,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,120,112,116,0,17,65,120,105,115,83,99,97,108,101,46,73,78,84,69,71,69,82"/>
+                </Property>
+                <Property name="yAxisLabel" type="java.lang.String" value="Number of Txns"/>
+                <Property name="yAxisScale" type="org.jfree.beans.AxisScale" editor="org.jfree.beans.editors.AxisScaleEditor">
+                  <SerializedValue value="-84,-19,0,5,115,114,0,25,111,114,103,46,106,102,114,101,101,46,98,101,97,110,115,46,65,120,105,115,83,99,97,108,101,110,85,102,59,126,70,-97,10,2,0,1,76,0,4,110,97,109,101,116,0,18,76,106,97,118,97,47,108,97,110,103,47,83,116,114,105,110,103,59,120,112,116,0,17,65,120,105,115,83,99,97,108,101,46,73,78,84,69,71,69,82"/>
+                </Property>
+              </Properties>
+              <Constraints>
+                <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+                  <JTabbedPaneConstraints tabName="Transactions" toolTip="View Transaction Statistics">
+                    <Property name="tabTitle" type="java.lang.String" value="Transactions"/>
+                    <Property name="tabToolTip" type="java.lang.String" value="View Transaction Statistics"/>
+                  </JTabbedPaneConstraints>
+                </Constraint>
+              </Constraints>
+
+              <Layout>
+                <DimensionLayout dim="0">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <EmptySpace min="0" pref="418" max="32767" attributes="0"/>
+                  </Group>
+                </DimensionLayout>
+                <DimensionLayout dim="1">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <EmptySpace min="0" pref="235" max="32767" attributes="0"/>
+                  </Group>
+                </DimensionLayout>
+              </Layout>
+            </Container>
+            <Container class="org.jfree.beans.JPieChart" name="txnPieChart">
+              <Constraints>
+                <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+                  <JTabbedPaneConstraints tabName="Pie Chart" toolTip="View Transactions as a Pie Chart">
+                    <Property name="tabTitle" type="java.lang.String" value="Pie Chart"/>
+                    <Property name="tabToolTip" type="java.lang.String" value="View Transactions as a Pie Chart"/>
+                  </JTabbedPaneConstraints>
+                </Constraint>
+              </Constraints>
+
+              <Layout>
+                <DimensionLayout dim="0">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <EmptySpace min="0" pref="418" max="32767" attributes="0"/>
+                  </Group>
+                </DimensionLayout>
+                <DimensionLayout dim="1">
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <EmptySpace min="0" pref="235" max="32767" attributes="0"/>
+                  </Group>
+                </DimensionLayout>
+              </Layout>
+            </Container>
+          </SubComponents>
+        </Container>
+        <Container class="javax.swing.JPanel" name="periodSelectPanel">
+
+          <Layout>
+            <DimensionLayout dim="0">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="periodSelectSlider" pref="334" max="32767" attributes="0"/>
+                  </Group>
+              </Group>
+            </DimensionLayout>
+            <DimensionLayout dim="1">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" alignment="0" attributes="0">
+                              <EmptySpace min="12" pref="12" max="12" attributes="0"/>
+                              <Component id="jLabel2" pref="36" max="32767" attributes="0"/>
+                          </Group>
+                          <Component id="periodSelectSlider" alignment="0" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+            </DimensionLayout>
+          </Layout>
+          <SubComponents>
+            <Component class="javax.swing.JLabel" name="jLabel2">
+              <Properties>
+                <Property name="text" type="java.lang.String" value="Time Slices"/>
+                <Property name="toolTipText" type="java.lang.String" value="Select the number of polling periods to use for populating the pie chart"/>
+              </Properties>
+            </Component>
+            <Component class="javax.swing.JSlider" name="periodSelectSlider">
+              <Properties>
+                <Property name="paintLabels" type="boolean" value="true"/>
+                <Property name="paintTicks" type="boolean" value="true"/>
+                <Property name="toolTipText" type="java.lang.String" value="Select the number of time slices over which to show the pie chart"/>
+                <Property name="value" type="int" value="30"/>
+              </Properties>
+            </Component>
+          </SubComponents>
+        </Container>
+      </SubComponents>
+    </Container>
+    <Container class="javax.swing.JMenuBar" name="menuBar">
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
+        <Property name="useNullLayout" type="boolean" value="true"/>
+      </Layout>
+    </Container>
+  </SubComponents>
+</Form>

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfGraph.java	2011-04-21 10:07:58 UTC (rev 36963)
@@ -0,0 +1,752 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates,
+ * and individual contributors as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2011,
+ * @author JBoss, by Red Hat.
+ */
+package com.arjuna.ats.arjuna.tools.stats;
+
+import java.lang.reflect.InvocationTargetException;
+import javax.swing.JMenuBar;
+import org.jfree.data.time.TimeSeries;
+import org.jfree.data.time.Second;
+import com.arjuna.ats.arjuna.coordinator.TxStatsMBean;
+import com.arjuna.ats.arjuna.common.CoordinatorEnvironmentBeanMBean;
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.Calendar;
+
+import java.util.Date;
+import javax.management.*;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerModel;
+import javax.swing.SpinnerNumberModel;
+import javax.swing.SwingUtilities;
+import javax.swing.SwingWorker;
+import javax.swing.border.EmptyBorder;
+import org.jfree.data.general.DefaultPieDataset;
+import org.jfree.data.time.TimeSeriesCollection;
+
+public class TxPerfGraph extends javax.swing.JPanel { //JFrame {
+    private final static int NUMBER_OF_SAMPLES = 100;
+
+    private int POLL_PERIOD = 4000; // in ms
+
+    public final static int NUMBER_OF_TRANSACTIONS_SERIES = 0;
+    public final static int NUMBER_OF_INFLIGHT_SERIES = 1;
+    public final static int NUMBER_OF_COMMITTED_SERIES = 2;
+    public final static int NUMBER_OF_ABORTED_SERIES = 3;
+    public final static int NUMBER_OF_HEURISTICS_SERIES = 4;
+    public final static int NUMBER_OF_NESTED_SERIES = 5;
+    public final static int NUMBER_OF_TIMEDOUT_SERIES = 6;
+
+    private final static String[] SERIES_LABELS = {
+        "Transactions Created",
+        "In Flight Transactions",
+        "Committed Transactions",
+        "Aborted Transactions",
+        "Heuristics Raised",
+        "Nested Transactions Created",
+        "Timed Out Transactions",
+    };
+
+    private final static String[] PIE_CHART_LABELS = {
+        "Nested",
+        "Heuristic",
+        "Committed",
+        "Aborted",
+    };
+
+    private final static int[] PIE_CHART_SERIES = new int[] {
+         NUMBER_OF_NESTED_SERIES,
+         NUMBER_OF_HEURISTICS_SERIES,
+         NUMBER_OF_COMMITTED_SERIES,
+         NUMBER_OF_ABORTED_SERIES,
+    };
+
+
+    private MBeanServerConnection server;
+    private JFrame frame;
+    private TxStatsMBean txMBean;
+    private CoordinatorEnvironmentBeanMBean coordMBean;
+
+    private TimeSeries[] _dataSeries = new TimeSeries[7];
+    private TimeSeriesCollection _tsDS[] = new TimeSeriesCollection[7];
+    private Second currPeriod;
+    private Second tZero;
+    private DefaultPieDataset pieDS;
+ //   TimerTask timerTask;
+ //   Timer timer = new Timer("TxPerf Sampling thread");
+    javax.swing.Timer swingTimer;
+    ActionListener taskPerformer;
+
+    /** Creates new form TxPerfGraph */
+    public TxPerfGraph(JFrame frame) {
+        this.frame = frame;
+        tZero = new Second(new Date());
+        initComponents();
+
+        for (int count = 0; count < _dataSeries.length; count++) {
+            _dataSeries[count] = new TimeSeries(SERIES_LABELS[count]);//, Second.class);
+            //_dataSeries[count].setMaximumItemCount(NUMBER_OF_SAMPLES);
+            _tsDS[count] = new TimeSeriesCollection(_dataSeries[count]);
+        }
+
+        chart1.setDataset(_tsDS[NUMBER_OF_TRANSACTIONS_SERIES]);
+        chart1.setTitle(SERIES_LABELS[NUMBER_OF_TRANSACTIONS_SERIES]);
+        chart1.setSubtitle("");
+
+        allTxnBtn.setSelected(true);
+
+        pieDS = new DefaultPieDataset();
+
+        txnPieChart.setDataset(pieDS);
+        txnPieChart.setTitle("All Transactions");
+        txnPieChart.setSubtitle("(during last time slices)");
+
+        periodSelectSlider.setMajorTickSpacing(10);
+        periodSelectSlider.setToolTipText(
+			"Select the number of (" + POLL_PERIOD + "ms) time slices over which to show the pie chart");
+
+        SpinnerModel sm1 = new SpinnerNumberModel(POLL_PERIOD / 1000, 1, 10000, 1);
+        SpinnerModel sm2 = new SpinnerNumberModel(NUMBER_OF_SAMPLES, 10, 1000, 1);
+
+        pollIntervalSpinner.setModel(sm1);
+        pollIntervalSpinner.setEditor(new JSpinner.NumberEditor(pollIntervalSpinner, "#"));
+        sampleSizeSpinner.setModel(sm2);
+        sampleSizeSpinner.setEditor(new JSpinner.NumberEditor(sampleSizeSpinner, "#"));
+
+        pollIntervalSpinner.setVisible(false);
+        sampleSizeSpinner.setVisible(false);
+        enableStatsCB.setSelected(false);
+        resetStatsBtn.setVisible(false);
+		pollIntervalBtn.setVisible(false);
+		sampleSizeBtn1.setVisible(false);
+
+        taskPerformer = new ActionListener() {
+            public void actionPerformed(ActionEvent evt) {
+                newSwingWorker().execute();
+            }
+        };
+
+        swingTimer = new javax.swing.Timer(POLL_PERIOD, taskPerformer);
+
+        chartsPane.setSelectedIndex(1);
+    }
+
+    public void setMBeanServerConnection(MBeanServerConnection mbs) {
+        this.server = mbs;
+        try {
+            txMBean = JMX.newMBeanProxy(server,
+                    new ObjectName("jboss.jta:name=TransactionStatistics"), TxStatsMBean.class);
+            coordMBean = JMX.newMBeanProxy(server,
+                    new ObjectName("jboss.jta:name=CoordinatorEnvironmentBean"),
+                        CoordinatorEnvironmentBeanMBean.class);
+
+            coordMBean.setEnableStatistics(true);
+            enableStatsCB.setSelected(true);
+
+//        } catch (javax.management.InstanceNotFoundException e) {
+//            System.out.println("Transaction statistics MBean is not available.");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void resetStats() {
+        //int cindex = _dataSeries[0].getIndex(now);
+    }
+
+    private void sample() {
+        try {
+            int secs = Calendar.getInstance().get(Calendar.SECOND) - tZero.getSecond();
+            Date d1 = new Date(secs);
+            Date d2 = new Date();
+            Second now = new Second(d2);
+
+            long [] stats = new long[7];
+
+            stats[NUMBER_OF_TRANSACTIONS_SERIES] = txMBean.getNumberOfTransactions();
+            stats[NUMBER_OF_INFLIGHT_SERIES] = txMBean.getNumberOfInflightTransactions();
+            stats[NUMBER_OF_COMMITTED_SERIES] = txMBean.getNumberOfCommittedTransactions();
+            stats[NUMBER_OF_ABORTED_SERIES] = txMBean.getNumberOfAbortedTransactions();
+            stats[NUMBER_OF_HEURISTICS_SERIES] = txMBean.getNumberOfHeuristics();
+            stats[NUMBER_OF_NESTED_SERIES] = txMBean.getNumberOfNestedTransactions();
+            stats[NUMBER_OF_TIMEDOUT_SERIES] = txMBean.getNumberOfTimedOutTransactions();
+
+            for (int i = 0; i < 7; i++) {
+                _dataSeries[i].addOrUpdate(now, stats[i]);
+            }
+
+            if (currPeriod != null) {
+                long [] pstats = new long[PIE_CHART_SERIES.length];
+
+                int cindex = _dataSeries[0].getIndex(now);
+                int slices = periodSelectSlider.getValue();
+                int lb = cindex < slices ? 0 : cindex - slices;
+
+                for (int i = 0; i < PIE_CHART_SERIES.length; i++) {
+                    TimeSeries ts = _dataSeries[PIE_CHART_SERIES[i]];
+
+                    pieDS.setValue(PIE_CHART_LABELS[i], pstats[i] =
+                            ts.getValue(cindex).longValue() - ts.getValue(lb).longValue());
+                }
+
+                txnPieChart.setSubtitle("(during last " + // (cindex - lb + 1) * POLL_PERIOD / 1000 + " seconds) - " +
+                        (cindex - lb + 1) + " poll intervals");
+            }
+
+            currPeriod = now;
+        } catch (Exception e) {
+            System.err.println("MBean property failure: " + e);
+        }
+    }
+
+    /** This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents() {
+
+        seriesSelectBtnGroup = new javax.swing.ButtonGroup();
+        configBtnGroup = new javax.swing.ButtonGroup();
+        jPanel1 = new javax.swing.JPanel();
+        btnPanel = new javax.swing.JPanel();
+        jLabel1 = new javax.swing.JLabel();
+        allTxnBtn = new javax.swing.JRadioButton();
+        inFlightTxnBtn = new javax.swing.JRadioButton();
+        committedTxnBtn = new javax.swing.JRadioButton();
+        abortedTxnBtn = new javax.swing.JRadioButton();
+        heuristicTxnBtn = new javax.swing.JRadioButton();
+        nestedTxnBtn = new javax.swing.JRadioButton();
+        timedoutTxnBtn = new javax.swing.JRadioButton();
+        chartsPane = new javax.swing.JTabbedPane();
+        configTab = new javax.swing.JPanel();
+        resetStatsBtn = new javax.swing.JButton();
+        pollIntervalSpinner = new javax.swing.JSpinner();
+        pollIntervalBtn = new javax.swing.JButton();
+        enableStatsCB = new javax.swing.JCheckBox();
+        sampleSizeBtn1 = new javax.swing.JButton();
+        sampleSizeSpinner = new javax.swing.JSpinner();
+        chart1 = new org.jfree.beans.JLineChart();
+        txnPieChart = new org.jfree.beans.JPieChart();
+        periodSelectPanel = new javax.swing.JPanel();
+        jLabel2 = new javax.swing.JLabel();
+        periodSelectSlider = new javax.swing.JSlider();
+        menuBar = new javax.swing.JMenuBar();
+
+        setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.LINE_AXIS));
+
+        jLabel1.setText("Select Series");
+
+        seriesSelectBtnGroup.add(allTxnBtn);
+        allTxnBtn.setText("Transactions");
+        allTxnBtn.setToolTipText("Show all transactions");
+        allTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                allTxnBtnActionPerformed(evt);
+            }
+        });
+
+        seriesSelectBtnGroup.add(inFlightTxnBtn);
+        inFlightTxnBtn.setText("In Flight");
+        inFlightTxnBtn.setToolTipText("Show transactions that have not yet been committed/aborted");
+        inFlightTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                inFlightTxnBtnActionPerformed(evt);
+            }
+        });
+
+        seriesSelectBtnGroup.add(committedTxnBtn);
+        committedTxnBtn.setText("Committed");
+        committedTxnBtn.setToolTipText("Show successfully committed transactions");
+        committedTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                committedTxnBtnActionPerformed(evt);
+            }
+        });
+
+        seriesSelectBtnGroup.add(abortedTxnBtn);
+        abortedTxnBtn.setText("Aborted");
+        abortedTxnBtn.setToolTipText("Show stats for rolled back transactions");
+        abortedTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                abortedTxnBtnActionPerformed(evt);
+            }
+        });
+
+        seriesSelectBtnGroup.add(heuristicTxnBtn);
+        heuristicTxnBtn.setText("Heuristics");
+        heuristicTxnBtn.setToolTipText("Show stats for transactions that terminated with a heuristic outcome");
+        heuristicTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                heuristicTxnBtnActionPerformed(evt);
+            }
+        });
+
+        seriesSelectBtnGroup.add(nestedTxnBtn);
+        nestedTxnBtn.setText("Nested");
+        nestedTxnBtn.setToolTipText("Stats for nested transactions");
+        nestedTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                nestedTxnBtnActionPerformed(evt);
+            }
+        });
+
+        seriesSelectBtnGroup.add(timedoutTxnBtn);
+        timedoutTxnBtn.setText("Timed Out");
+        timedoutTxnBtn.setToolTipText("Stats for transactions which exceeded there time to live");
+        timedoutTxnBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                timedoutTxnBtnActionPerformed(evt);
+            }
+        });
+
+        javax.swing.GroupLayout btnPanelLayout = new javax.swing.GroupLayout(btnPanel);
+        btnPanel.setLayout(btnPanelLayout);
+        btnPanelLayout.setHorizontalGroup(
+            btnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(btnPanelLayout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(btnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(btnPanelLayout.createSequentialGroup()
+                        .addGroup(btnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(inFlightTxnBtn)
+                            .addComponent(allTxnBtn)
+                            .addComponent(abortedTxnBtn)
+                            .addComponent(committedTxnBtn))
+                        .addGap(35, 35, 35)
+                        .addGroup(btnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(nestedTxnBtn)
+                            .addComponent(heuristicTxnBtn)
+                            .addComponent(timedoutTxnBtn)))
+                    .addComponent(jLabel1))
+                .addContainerGap(188, Short.MAX_VALUE))
+        );
+        btnPanelLayout.setVerticalGroup(
+            btnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, btnPanelLayout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jLabel1)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addGroup(btnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(btnPanelLayout.createSequentialGroup()
+                        .addComponent(heuristicTxnBtn)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(nestedTxnBtn)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(timedoutTxnBtn))
+                    .addGroup(btnPanelLayout.createSequentialGroup()
+                        .addComponent(allTxnBtn)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(inFlightTxnBtn)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(committedTxnBtn)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(abortedTxnBtn))))
+        );
+
+        chartsPane.addChangeListener(new javax.swing.event.ChangeListener() {
+            public void stateChanged(javax.swing.event.ChangeEvent evt) {
+                chartsPaneStateChanged(evt);
+            }
+        });
+
+        resetStatsBtn.setText("Reset Stats");
+        resetStatsBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                resetStatsBtnActionPerformed(evt);
+            }
+        });
+
+        pollIntervalSpinner.setToolTipText("Change polling interval (in seconds)");
+
+        pollIntervalBtn.setText("Set Poll Interval");
+        pollIntervalBtn.setToolTipText("Change polling interval (in seconds)");
+        pollIntervalBtn.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                pollIntervalBtnActionPerformed(evt);
+            }
+        });
+
+        enableStatsCB.setText("Enable Statistics");
+        enableStatsCB.setToolTipText("Stop data collection by disabling the stats MBean in the target JVM");
+        enableStatsCB.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                enableStatsCBActionPerformed(evt);
+            }
+        });
+
+        sampleSizeBtn1.setText("Set Sample Size");
+        sampleSizeBtn1.setToolTipText("Change polling interval (in seconds)");
+        sampleSizeBtn1.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                sampleSizeBtn1ActionPerformed(evt);
+            }
+        });
+
+        sampleSizeSpinner.setToolTipText("Change Number of Data Samples ");
+
+        javax.swing.GroupLayout configTabLayout = new javax.swing.GroupLayout(configTab);
+        configTab.setLayout(configTabLayout);
+        configTabLayout.setHorizontalGroup(
+            configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(configTabLayout.createSequentialGroup()
+                .addGroup(configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(configTabLayout.createSequentialGroup()
+                        .addGap(20, 20, 20)
+                        .addGroup(configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(enableStatsCB)
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, configTabLayout.createSequentialGroup()
+                                .addGroup(configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                                    .addComponent(resetStatsBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
+                                    .addGroup(configTabLayout.createSequentialGroup()
+                                        .addComponent(pollIntervalBtn, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE)
+                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                                        .addComponent(pollIntervalSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                                .addGap(152, 152, 152))))
+                    .addGroup(configTabLayout.createSequentialGroup()
+                        .addGap(22, 22, 22)
+                        .addComponent(sampleSizeBtn1)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(sampleSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                .addContainerGap())
+        );
+        configTabLayout.setVerticalGroup(
+            configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(configTabLayout.createSequentialGroup()
+                .addGap(35, 35, 35)
+                .addComponent(enableStatsCB)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(sampleSizeBtn1)
+                    .addComponent(sampleSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(configTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(pollIntervalBtn)
+                    .addComponent(pollIntervalSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(resetStatsBtn)
+                .addContainerGap(73, Short.MAX_VALUE))
+        );
+
+        chartsPane.addTab("Settings", configTab);
+
+        chart1.setXAxisLabel("Time of Day");
+        chart1.setXAxisScale(org.jfree.beans.AxisScale.INTEGER);
+        chart1.setYAxisLabel("Number of Txns");
+        chart1.setYAxisScale(org.jfree.beans.AxisScale.INTEGER);
+
+        javax.swing.GroupLayout chart1Layout = new javax.swing.GroupLayout(chart1);
+        chart1.setLayout(chart1Layout);
+        chart1Layout.setHorizontalGroup(
+            chart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 418, Short.MAX_VALUE)
+        );
+        chart1Layout.setVerticalGroup(
+            chart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 235, Short.MAX_VALUE)
+        );
+
+        chartsPane.addTab("Transactions", null, chart1, "View Transaction Statistics");
+
+        javax.swing.GroupLayout txnPieChartLayout = new javax.swing.GroupLayout(txnPieChart);
+        txnPieChart.setLayout(txnPieChartLayout);
+        txnPieChartLayout.setHorizontalGroup(
+            txnPieChartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 418, Short.MAX_VALUE)
+        );
+        txnPieChartLayout.setVerticalGroup(
+            txnPieChartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 235, Short.MAX_VALUE)
+        );
+
+        chartsPane.addTab("Pie Chart", null, txnPieChart, "View Transactions as a Pie Chart");
+
+        jLabel2.setText("Time Slices");
+        jLabel2.setToolTipText("Select the number of polling periods to use for populating the pie chart");
+
+        periodSelectSlider.setPaintLabels(true);
+        periodSelectSlider.setPaintTicks(true);
+        periodSelectSlider.setToolTipText("Select the number of time slices over which to show the pie chart");
+        periodSelectSlider.setValue(30);
+
+        javax.swing.GroupLayout periodSelectPanelLayout = new javax.swing.GroupLayout(periodSelectPanel);
+        periodSelectPanel.setLayout(periodSelectPanelLayout);
+        periodSelectPanelLayout.setHorizontalGroup(
+            periodSelectPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(periodSelectPanelLayout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jLabel2)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(periodSelectSlider, javax.swing.GroupLayout.DEFAULT_SIZE, 334, Short.MAX_VALUE))
+        );
+        periodSelectPanelLayout.setVerticalGroup(
+            periodSelectPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(periodSelectPanelLayout.createSequentialGroup()
+                .addGroup(periodSelectPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(periodSelectPanelLayout.createSequentialGroup()
+                        .addGap(12, 12, 12)
+                        .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE))
+                    .addComponent(periodSelectSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
+
+        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+        jPanel1.setLayout(jPanel1Layout);
+        jPanel1Layout.setHorizontalGroup(
+            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(jPanel1Layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(periodSelectPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(chartsPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
+                    .addComponent(btnPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap())
+        );
+        jPanel1Layout.setVerticalGroup(
+            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(jPanel1Layout.createSequentialGroup()
+                .addComponent(chartsPane, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(periodSelectPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(btnPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(14, Short.MAX_VALUE))
+        );
+
+        add(jPanel1);
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void btnActionPerformed(int series) {
+        chart1.setDataset(_tsDS[series]);
+        chart1.setTitle(SERIES_LABELS[series]);
+    }
+    private void allTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_TRANSACTIONS_SERIES);
+    }//GEN-LAST:event_allTxnBtnActionPerformed
+
+    private void inFlightTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inFlightTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_INFLIGHT_SERIES);
+    }//GEN-LAST:event_inFlightTxnBtnActionPerformed
+
+    private void heuristicTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_heuristicTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_HEURISTICS_SERIES);
+    }//GEN-LAST:event_heuristicTxnBtnActionPerformed
+
+    private void committedTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_committedTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_COMMITTED_SERIES);
+    }//GEN-LAST:event_committedTxnBtnActionPerformed
+
+    private void abortedTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_abortedTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_ABORTED_SERIES);
+    }//GEN-LAST:event_abortedTxnBtnActionPerformed
+
+    private void nestedTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nestedTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_NESTED_SERIES);
+    }//GEN-LAST:event_nestedTxnBtnActionPerformed
+
+    private void timedoutTxnBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timedoutTxnBtnActionPerformed
+        btnActionPerformed(NUMBER_OF_TIMEDOUT_SERIES);
+    }//GEN-LAST:event_timedoutTxnBtnActionPerformed
+
+    private void chartsPaneStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_chartsPaneStateChanged
+        int tab = chartsPane.getSelectedIndex();
+
+        btnPanel.setVisible(false);
+        periodSelectPanel.setVisible(false);
+
+        switch (tab) {
+            case 1: btnPanel.setVisible(true); break;
+            case 2: periodSelectPanel.setVisible(true); break;
+            default:
+                break;
+        }
+    }//GEN-LAST:event_chartsPaneStateChanged
+
+    private void pollIntervalBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pollIntervalBtnActionPerformed
+        Integer v = (Integer) pollIntervalSpinner.getValue();
+
+        POLL_PERIOD = v * 1000;
+        swingTimer.setDelay(POLL_PERIOD);
+        startPolling();
+    }//GEN-LAST:event_pollIntervalBtnActionPerformed
+
+    private void resetStatsBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetStatsBtnActionPerformed
+        resetStats();
+}//GEN-LAST:event_resetStatsBtnActionPerformed
+
+    private void enableStatsCBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enableStatsCBActionPerformed
+        coordMBean.setEnableStatistics(enableStatsCB.isSelected());
+    }//GEN-LAST:event_enableStatsCBActionPerformed
+
+    private void sampleSizeBtn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sampleSizeBtn1ActionPerformed
+        // TODO add your handling code here:
+    }//GEN-LAST:event_sampleSizeBtn1ActionPerformed
+
+    private void startPolling() {
+       // timer.cancel();       
+
+        //timer.schedule(timerTask, 0, POLL_PERIOD);
+        if (swingTimer.isRunning())
+            swingTimer.restart();
+        else
+            swingTimer.start();
+    }
+
+    private static void createAndShowGUI(TxPerfGraph perfPanel) {
+        JFrame frame = perfPanel.getFrame();
+        // Create and set up the window.
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        // Create and set up the content pane.
+        JComponent contentPane = (JComponent) frame.getContentPane();
+        contentPane.add(perfPanel, BorderLayout.CENTER);
+        contentPane.setOpaque(true); //content panes must be opaque
+        contentPane.setBorder(new EmptyBorder(12, 12, 12, 12));
+        frame.setContentPane(contentPane);
+
+        // Display the window.
+        frame.pack();
+        frame.setVisible(true);
+    }
+
+    private static MBeanServerConnection connect(String hostname, int port) {
+        String urlPath = "/jndi/rmi://" + hostname + ":" + port + "/jmxrmi";
+        MBeanServerConnection server = null;
+
+        try {
+            JMXServiceURL url = new JMXServiceURL("rmi", "", 0, urlPath);
+            JMXConnector jmxc = JMXConnectorFactory.connect(url);
+            server = jmxc.getMBeanServerConnection();
+        } catch (MalformedURLException e) {
+        } catch (IOException e) {
+            System.err.println("Unable to get an MBean Server connection: " + e.getMessage());
+            System.exit(1);
+        }
+
+        return server;
+    }
+
+    /*
+     * SwingWorker for updating the TxPerf tab
+     */
+    public SwingWorker<TimeSeries[], Object> newSwingWorker() {
+        return new Worker();
+    }
+
+    class Worker extends SwingWorker<TimeSeries[], Object> {
+
+        @Override
+        protected TimeSeries[] doInBackground() throws Exception {
+            sample();
+            return _dataSeries;
+        }
+    }
+
+    public static void main(String args[]) throws InterruptedException, InvocationTargetException {
+        final TxPerfGraph graphPanel = new TxPerfGraph(new JFrame("TxPerf"));
+        String hostname = "localhost";
+        int port = 1090;
+
+        if (args.length > 0) {
+            String[] opts = args[0].split(":");
+
+            hostname = opts[0];
+
+            if (opts.length > 1)
+                port = Integer.parseInt(opts[1]);
+        }
+
+        System.out.println("Connecting to MBeanServer on endpoint " + hostname + ":" + port);
+
+        MBeanServerConnection server = connect(hostname, port);
+        graphPanel.setMBeanServerConnection(server);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+
+            public void run() {
+                createAndShowGUI(graphPanel);
+            }
+        });
+
+        graphPanel.startPolling();
+
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JRadioButton abortedTxnBtn;
+    private javax.swing.JRadioButton allTxnBtn;
+    private javax.swing.JPanel btnPanel;
+    private org.jfree.beans.JLineChart chart1;
+    private javax.swing.JTabbedPane chartsPane;
+    private javax.swing.JRadioButton committedTxnBtn;
+    private javax.swing.ButtonGroup configBtnGroup;
+    private javax.swing.JPanel configTab;
+    private javax.swing.JCheckBox enableStatsCB;
+    private javax.swing.JRadioButton heuristicTxnBtn;
+    private javax.swing.JRadioButton inFlightTxnBtn;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JPanel jPanel1;
+    private javax.swing.JMenuBar menuBar;
+    private javax.swing.JRadioButton nestedTxnBtn;
+    private javax.swing.JPanel periodSelectPanel;
+    private javax.swing.JSlider periodSelectSlider;
+    private javax.swing.JButton pollIntervalBtn;
+    private javax.swing.JSpinner pollIntervalSpinner;
+    private javax.swing.JButton resetStatsBtn;
+    private javax.swing.JButton sampleSizeBtn1;
+    private javax.swing.JSpinner sampleSizeSpinner;
+    private javax.swing.ButtonGroup seriesSelectBtnGroup;
+    private javax.swing.JRadioButton timedoutTxnBtn;
+    private org.jfree.beans.JPieChart txnPieChart;
+    // End of variables declaration//GEN-END:variables
+
+    /**
+     * @return the frame
+     */
+    public JFrame getFrame() {
+        return frame;
+    }
+
+    private void setDefaultCloseOperation(int operation) {
+        frame.setDefaultCloseOperation(operation);
+    }
+
+    private Container getContentPane() {
+        return frame.getContentPane();
+    }
+
+    private void setJMenuBar(JMenuBar menuBar) {
+        frame.setJMenuBar(menuBar);
+    }
+
+    private void pack() {
+    }
+}

Added: labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfPlugin.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfPlugin.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/tools/stats/TxPerfPlugin.java	2011-04-21 10:07:58 UTC (rev 36963)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and/or its affiliates,
+ * and individual contributors as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2011,
+ * @author JBoss, by Red Hat.
+ */
+package com.arjuna.ats.arjuna.tools.stats;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import javax.swing.JPanel;
+import javax.swing.SwingWorker;
+
+import com.sun.tools.jconsole.JConsolePlugin;
+import com.sun.tools.jconsole.JConsoleContext;
+import com.sun.tools.jconsole.JConsoleContext.ConnectionState;
+import javax.swing.JFrame;
+
+public class TxPerfPlugin extends JConsolePlugin implements PropertyChangeListener
+{
+    private TxPerfGraph graph;
+    private Map<String, JPanel> tabs;
+
+    public TxPerfPlugin() {
+        addContextPropertyChangeListener(this);
+    }
+
+    public synchronized Map<String, JPanel> getTabs() {
+        if (tabs == null) {
+            tabs = new LinkedHashMap<String, JPanel>();
+
+            graph = new TxPerfGraph(new JFrame("TxPerf"));
+            graph.setMBeanServerConnection(getContext().getMBeanServerConnection());
+            tabs.put("TxPerf", graph);
+        }
+
+        return tabs;
+    }
+
+    public void propertyChange(PropertyChangeEvent ev) {
+        String prop = ev.getPropertyName();
+        if (prop == null ? JConsoleContext.CONNECTION_STATE_PROPERTY == null : prop.equals(JConsoleContext.CONNECTION_STATE_PROPERTY)) {
+            ConnectionState oldState = (ConnectionState)ev.getOldValue();
+            ConnectionState newState = (ConnectionState)ev.getNewValue();
+            // JConsole supports disconnection and reconnection
+            // The MBeanServerConnection will become invalid when
+            // disconnected. Need to use the new MBeanServerConnection object
+            // created at reconnection time.
+            if (newState == ConnectionState.CONNECTED && graph != null) {
+                graph.setMBeanServerConnection(getContext().getMBeanServerConnection());
+            }
+        }
+    }
+
+    @Override
+    public SwingWorker<?,?> newSwingWorker() {
+        return graph.newSwingWorker();
+    }
+}

Modified: labs/jbosstm/trunk/ArjunaJTS/INSTALL
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/INSTALL	2011-04-21 09:54:27 UTC (rev 36962)
+++ labs/jbosstm/trunk/ArjunaJTS/INSTALL	2011-04-21 10:07:58 UTC (rev 36963)
@@ -211,16 +211,26 @@
 Tools Deployment
 ----------------
 
-Embedded tools is an applet that runs in process with the AS which
-includes an interface for inspecting transactions. It is deployed as
-a service archive and can be found in the product install directory:
-<install directory>/bin/jbossts-tools.sar
+Transaction management is integrated into the admin console in the form of a JOPR plugin
+which is located in the install bin directory (jbossts-jopr-plugin.jar). Install it by copying
+to the admin console plugin directory ($JBOSS_HOME/common/deploy/admin-console.war/plugins).
 
-To start the tool simply copy the sar to the AS deploy directory, open
-the JMX console (http://.../jmx-console) and click on the service named
-EmbeddedTools.
+There is also a transaction statistics graphing tool which can run standalone or inside a
+jconsole tab (jconsole, a tool for managing JVMs, is distributed with the reference JDK):
 
-Note that the embedded tools will be deprecated in favour of the JOPR plugin
-for JBossTS transaction management. This is available as a jar in the install
-bin directory (jbossts-jopr-plugin.jar) which should be installed in the
-embedded JOPR plugin directory ($JBOSS_HOME/common/deploy/admin-console.war/plugins)
+The tool depends on the JFree graphing library. Download and upack orson from http://www.jfree.org/orson
+Set the env variable ORSON_HOME to the directory where you plan to unpack the downloaded zip.
+If you intend to use the tool with jconsole you will also need to put the JDK tools and jconsole jars on
+the classpath:
+
+export CLASSPATH="$JDK_HOME/lib/tools.jar:$JDK_HOME/lib/jconsole.jar:$ORSON_HOME/orson-0.5.0.jar:$ORSON_HOME/lib/jfreechart-1.0.6.jar:$ORSON_HOME/lib/jcommon-1.0.10.jar:$TS_INSTALL_DIR/lib/jbossjts.jar>"
+
+Standalone Usage:
+
+java com.arjuna.ats.arjuna.tools.stats.TxPerfGraph
+
+(note that standalone usage does not require the JDK tools and jconsole jars)
+
+Usage with jconsole:
+
+jconsole -J-Djava.class.path="$CLASSPATH" -pluginpath $TS_INSTALL_DIR/lib/jbossjts.jar

Added: labs/jbosstm/trunk/ext/jcommon-1.0.10.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/ext/jcommon-1.0.10.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/trunk/ext/jfreechart-1.0.6.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/ext/jfreechart-1.0.6.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/trunk/ext/orson-0.5.0.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/ext/orson-0.5.0.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: labs/jbosstm/trunk/maven/pom-template.xml
===================================================================
--- labs/jbosstm/trunk/maven/pom-template.xml	2011-04-21 09:54:27 UTC (rev 36962)
+++ labs/jbosstm/trunk/maven/pom-template.xml	2011-04-21 10:07:58 UTC (rev 36963)
@@ -310,19 +310,6 @@
             <version>2.3.1jboss.patch01-brew</version><!-- TODO AS7 -->
         </dependency>
 
-        <!-- tsmx (tooling) requires graphing support: -->
-        <dependency>
-            <groupId>jfree</groupId>
-            <artifactId>jfreechart</artifactId>
-            <version>1.0.2</version>
-        </dependency>
-
-        <dependency>
-            <groupId>jfree</groupId>
-            <artifactId>jcommon</artifactId>
-            <version>1.0.2</version>
-        </dependency>
-
         <!-- atsintegration (i.e. the JBossAS glue code) requires some app server bits. -->
 
         <dependency>

Modified: labs/jbosstm/trunk/sharedbuild.xml
===================================================================
--- labs/jbosstm/trunk/sharedbuild.xml	2011-04-21 09:54:27 UTC (rev 36962)
+++ labs/jbosstm/trunk/sharedbuild.xml	2011-04-21 10:07:58 UTC (rev 36963)
@@ -285,6 +285,9 @@
                 <attribute name="arjuna-scm-revision" value="${com.hp.mw.sourceid}"/>
                 <attribute name="arjuna-builder" value="JBoss Inc. [${user.name}] ${os.name} ${os.version} ${buildproperty.date}"/>
             </manifest>
+            <service type="com.sun.tools.jconsole.JConsolePlugin">
+                <provider classname="com.arjuna.ats.arjuna.tools.stats.TxPerfPlugin"/>
+            </service>
         </jar>
 
         <for list="${component-module-list}" param="module">



More information about the jboss-svn-commits mailing list