[jboss-cvs] JBossAS SVN: r85253 - in trunk: testsuite/src/main/org/jboss/test/profileservice/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 4 15:39:41 EST 2009


Author: emuckenhuber
Date: 2009-03-04 15:39:41 -0500 (Wed, 04 Mar 2009)
New Revision: 85253

Modified:
   trunk/server/src/etc/deploy/transaction-jboss-beans.xml
   trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java
Log:
merge r85204, JBAS-5529, annotate the TransactionManger for management.

Modified: trunk/server/src/etc/deploy/transaction-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deploy/transaction-jboss-beans.xml	2009-03-04 20:36:27 UTC (rev 85252)
+++ trunk/server/src/etc/deploy/transaction-jboss-beans.xml	2009-03-04 20:39:41 UTC (rev 85253)
@@ -3,6 +3,7 @@
 
     <bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
         <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation>
+        <annotation>@org.jboss.managed.api.annotation.ManagementObject(name="TransactionManager",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype = "JTA"),targetInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class)</annotation>
 
         <property name="transactionTimeout">300</property>
         <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>

Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java	2009-03-04 20:36:27 UTC (rev 85252)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ServerManagedObjectsTestCase.java	2009-03-04 20:39:41 UTC (rev 85253)
@@ -162,6 +162,41 @@
     * 
     * @throws Exception
     */
+   public void testTransactionManager()
+      throws Exception
+   {
+      ManagementView mgtView = getManagementView();
+      ComponentType type = new ComponentType("MCBean", "JTA");
+      ManagedComponent mc = mgtView.getComponent("TransactionManager", type);
+      assertNotNull(mc);
+      Map<String, ManagedProperty> props = mc.getProperties();
+      getLog().info(props);
+
+      ManagedProperty transactionCount = props.get("transactionCount");
+      assertNotNull(transactionCount);
+      getLog().info("transactionCount, "+transactionCount.getValue());
+      ManagedProperty commitCount = props.get("commitCount");
+      assertNotNull(commitCount);
+      getLog().info("commitCount, "+commitCount.getValue());
+      ManagedProperty runningTransactionCount = props.get("runningTransactionCount");
+      assertNotNull(runningTransactionCount);
+      getLog().info("runningTransactionCount, "+runningTransactionCount.getValue());
+      ManagedProperty rollbackCount = props.get("rollbackCount");
+      assertNotNull(rollbackCount);
+      getLog().info("rollbackCount, "+rollbackCount.getValue());
+      ManagedProperty transactionTimeout = props.get("transactionTimeout");
+      assertNotNull(transactionTimeout);
+      getLog().info("transactionTimeout, "+transactionTimeout.getValue());
+      ManagedProperty timedoutCount = props.get("timedoutCount");
+      assertNotNull(timedoutCount);
+      getLog().info("timedoutCount, "+timedoutCount.getValue());
+      
+   }
+
+   /**
+    * 
+    * @throws Exception
+    */
    public void testServerConfig()
       throws Exception
    {




More information about the jboss-cvs-commits mailing list