[jboss-svn-commits] JBL Code SVN: r36489 - in labs/jbosstm/trunk/rhq-plugin: src and 6 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Dec 23 14:57:25 EST 2010


Author: mmusgrov
Date: 2010-12-23 14:57:24 -0500 (Thu, 23 Dec 2010)
New Revision: 36489

Added:
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/BaseComponent.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantComponent.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantDiscovery.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionComponent.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionDiscovery.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineComponent.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineDiscovery.java
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/XMBeanResourceComponent.java
   labs/jbosstm/trunk/rhq-plugin/src/main/resources/
Removed:
   labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/
   labs/jbosstm/trunk/rhq-plugin/src/resources/
Modified:
   labs/jbosstm/trunk/rhq-plugin/build.xml
   labs/jbosstm/trunk/rhq-plugin/pom.xml
   labs/jbosstm/trunk/rhq-plugin/src/main/resources/META-INF/rhq-plugin.xml
Log:
[JBTM-719] Convert plugin to depend on the JMX plugin (and simplify the implementation)


Modified: labs/jbosstm/trunk/rhq-plugin/build.xml
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/build.xml	2010-12-23 18:23:33 UTC (rev 36488)
+++ labs/jbosstm/trunk/rhq-plugin/build.xml	2010-12-23 19:57:24 UTC (rev 36489)
@@ -2,7 +2,7 @@
 
 <project name="rhq-plugin" default="maven:package" basedir=".">
 
-	<property name="modulename" value="jbossts-jopr-plugin"/>
+	<property name="modulename" value="jopr-jbossts-plugin-2.3.0.EmbJopr.1.3.0-4.jar"/>
 	<property name="component-module-list" value="${modulename}"/>
 	<property name="install.jar.dir" value="../install/bin"/>
 	<property name="install.doc.dir" value="../install/docs/rhq"/>

Modified: labs/jbosstm/trunk/rhq-plugin/pom.xml
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/pom.xml	2010-12-23 18:23:33 UTC (rev 36488)
+++ labs/jbosstm/trunk/rhq-plugin/pom.xml	2010-12-23 19:57:24 UTC (rev 36489)
@@ -1,169 +1,45 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.jboss</groupId>
-	<version>1.0.0.SNAPSHOT</version>
-	<artifactId>jbossts-jopr-plugin</artifactId>
-	<packaging>jar</packaging>
-	<!--
-	<version>1.0.0.SNAPSHOT</version>
-	-->
-	<name>JBoss Transaction Management JOPR plugin</name>
-	<url>http://www.jboss.org/jbosstm</url>
-	<description>JBossTS JOPR plugin</description>
-
-	<licenses>
-		<license>
-			<name>LGPL 2.1</name>
-			<url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
-		</license>
-	</licenses>
-
-	<scm>
-		<connection>scm:svn:http://anonsvn.jboss.org/repos/labs/labs/jbosstm/</connection>
-		<developerConnection>scm:svn:https://svn.jboss.org/repos/labs/labs/jbosstm/</developerConnection>
-		<url>http://fisheye.jboss.org/browse/JBossTS/</url>
-	</scm>
-
-	<repositories>
-		<repository>
-			<id>jboss-public-repository-group</id>
-			<name>JBoss Public Maven Repository Group</name>
-			<url>https://repository.jboss.org/nexus/content/groups/public/</url>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
-
-	<build>
-		<finalName>${artifactId}</finalName>
-		<resources>
-			<resource>
-				<directory>src/resources</directory>
-			</resource>
-		</resources>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.5</source>
-					<target>1.5</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<configuration>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-source-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>create_sources_jar</id>
-						<goals>
-							<goal>jar</goal>
-						</goals>
-						<phase>prepare-package</phase>
-					</execution>
-				</executions>
-				<configuration>
-					<forceCreation>true</forceCreation>
-					<includePom>true</includePom>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<version>2.7</version>
-				<executions>
-					<execution>
-						<id>create_javadocs</id>
-						<goals>
-							<goal>jar</goal>
-						</goals>
-						<phase>prepare-package</phase>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-source-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>create_sources_jar</id>
-						<goals> <goal>jar</goal> </goals>
-						<phase>prepare-package</phase>
-					</execution>
-				</executions>
-				<configuration>
-					<forceCreation>true</forceCreation>
-					<includePom>true</includePom>
-				</configuration>
-			</plugin>
-		</plugins>
-
-	</build>
-
-	<dependencyManagement>
-		<dependencies>
-			<dependency>
-				<!-- https://repository.jboss.org/nexus/service/local/repositories/releases/content/org/jboss/jbossas/jboss-as-component-matrix/ -->
-				<groupId>org.jboss.jbossas</groupId>
-				<artifactId>jboss-as-component-matrix</artifactId>
-				<version>6.0.0.20100721-M4</version>
-				<!--<version>6.0.0-SNAPSHOT</version>-->
-				<type>pom</type>
-				<scope>import</scope>
-			</dependency>
-		</dependencies>
-	</dependencyManagement>
-
-	<dependencies>
-		<!-- Compile (global dependencies) -->
-		<dependency>
-			<groupId>org.jboss.profileservice</groupId>
-			<artifactId>jboss-profileservice-spi</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.jboss.man</groupId>
-			<artifactId>jboss-managed</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.rhq</groupId>
-			<artifactId>rhq-core-domain</artifactId>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.rhq</groupId>
-			<artifactId>rhq-core-plugin-api</artifactId>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.rhq</groupId>
-			<artifactId>rhq-jmx-plugin</artifactId>
-			<scope>provided</scope>
-		</dependency>
-		<!--we dont compile without these, some strange annotation dependency-->
-		<dependency>
-			<groupId>org.hibernate.javax.persistence</groupId>
-			<artifactId>hibernate-jpa-2.0-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-annotations</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-		</dependency>
-	</dependencies>
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.jboss.on</groupId>
+        <!--  Bypass the jopr-plugins-parent which can not have children. It must build after the plugins in order to execute integration tests on them. -->
+        <artifactId>jopr-modules-parent</artifactId>
+        <version>2.3.0.EmbJopr.1.3.0-4</version>
+    </parent>
+
+    <groupId>org.jboss.on</groupId>
+    <artifactId>jopr-jbossts-plugin</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Jopr Test Plugin</name>
+    <description>A plugin for managing services</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>${rhq.groupId}</groupId>
+            <artifactId>rhq-jmx-plugin</artifactId>
+            <version>${rhq.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    <!--
+        <dependency>
+            <groupId>org.rhq</groupId>
+            <artifactId>rhq-jmx-plugin</artifactId>
+            <version>1.3.0.EmbJopr.1.3.0-4</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+        </dependency>
+        -->
+
+    </dependencies>
+</project>

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/BaseComponent.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnBaseComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/BaseComponent.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/BaseComponent.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,91 @@
+package org.rhq.plugins.jbossts;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
+import org.mc4j.ems.connection.bean.operation.EmsOperation;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.*;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+
+abstract public class BaseComponent implements ResourceComponent, MeasurementFacet, OperationFacet {
+    private ResourceContext context;
+
+    abstract protected EmsConnection getEmsConnection();
+
+    protected ResourceContext getResourceContext() {
+        return context;
+    }
+
+    public void start(ResourceContext context) throws InvalidPluginConfigurationException {
+        this.context = context;
+    }
+
+    public void stop() {
+    }
+
+    public AvailabilityType getAvailability() {
+        return AvailabilityType.UP;
+    }
+
+    protected EmsBean getBean() {
+        EmsConnection conn = getEmsConnection();
+
+        return conn.getBean(context.getResourceKey());
+    }
+
+    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) throws Exception
+    {
+        EmsBean bean = getBean();
+        String[] props =  new String[requests.size()];
+        MeasurementScheduleRequest[] reqs = requests.toArray(new MeasurementScheduleRequest[requests.size()]);
+
+        for (int i = 0; i < props.length; i++)
+            props[i] = reqs[i].getName();
+
+        List<String> reqProps = Arrays.asList(props);
+        List<EmsAttribute> al = bean.refreshAttributes(reqProps);
+
+        EmsAttribute[] aa = al.toArray(new EmsAttribute[al.size()]);
+
+        for (EmsAttribute emsAttr : aa) {
+            int index = reqProps.indexOf(emsAttr.getName());
+
+            //assert (index != -1);
+            if (index != -1) {
+                MeasurementScheduleRequest msr = reqs[index];
+
+                if (msr.getDataType().equals(DataType.MEASUREMENT))
+                    report.addData(new MeasurementDataNumeric(msr, Double.valueOf(emsAttr.getValue().toString())));
+                else if (msr.getDataType().equals(DataType.TRAIT))
+                    report.addData(new MeasurementDataTrait(msr, emsAttr.getValue().toString()));
+            }
+        }
+    }
+
+    public OperationResult invokeOperation(String name, Configuration params)
+    {
+        OperationResult result = new OperationResult();
+
+        try {
+            EmsBean bean = getBean();
+            EmsOperation op = bean.getOperation(name);
+            Object res = op.invoke(new Object[0]);
+            result.setSimpleResult("operation returned " + res);
+            result.setErrorMessage(null);
+        } catch (Exception e) {
+            result.setErrorMessage(e.getMessage() == null ? e.getClass().getName() :e.getMessage());
+        }
+
+        return result;
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantComponent.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnParticipantComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantComponent.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantComponent.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,34 @@
+package org.rhq.plugins.jbossts;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * RHQ representation of a Transaction Participant
+ */
+public class ParticipantComponent extends BaseComponent {
+
+    protected EmsConnection getEmsConnection() {
+        TransactionComponent tm = (TransactionComponent) getResourceContext().getParentResourceComponent();
+
+        return tm.getEmsConnection();
+    }
+
+    public OperationResult invokeOperation(String name, Configuration params) {
+        OperationResult res = new OperationResult();
+
+        if (name.equals("setStatus")) {
+            try {
+                getBean().getAttribute("Status").setValue("PREPARED");
+//                Object rv = getBean().getOperation(name).invoke(new Object[] {params.getSimpleValue("status", "PREPARED")});
+
+                res.setSimpleResult("Operation succeeded");
+            } catch (Exception e) {
+                res.setErrorMessage("Operation failed: " + (e.getMessage() == null ? e.getClass().getName() :e.getMessage()));
+            }
+        }
+
+        return res;
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantDiscovery.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnParticipantDiscoveryComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantDiscovery.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/ParticipantDiscovery.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,39 @@
+package org.rhq.plugins.jbossts;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A class for discovering which participants are involved in a particular transaction
+ */
+public class ParticipantDiscovery implements ResourceDiscoveryComponent
+{
+    /**
+     * @param context information about the containing transaction together with information available in
+     * the rhq descriptor
+     * @return a the participants involved in this transaction
+     */
+    public Set discoverResources(ResourceDiscoveryContext context)
+    {
+        Set<DiscoveredResourceDetails> participants = new HashSet<DiscoveredResourceDetails>();
+        TransactionComponent parent = (TransactionComponent) context.getParentResourceComponent();
+        String version = context.getDefaultPluginConfiguration().getSimpleValue("Version", "0.2");
+        String description = context.getDefaultPluginConfiguration().getSimpleValue("description", "A Transaction Participant");
+
+        for (EmsBean participant : parent.getParticipants()) {
+            String on = participant.getBeanName().getCanonicalName();
+
+            participants.add(new DiscoveredResourceDetails(
+                    context.getResourceType(), on, on, version,
+                    description, context.getDefaultPluginConfiguration(), null));
+        }
+
+        return participants;
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionComponent.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnEntryComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionComponent.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionComponent.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,70 @@
+package org.rhq.plugins.jbossts;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+import java.util.Collection;
+
+/**
+ * RHQ representation of a single transaction
+ */
+public class TransactionComponent extends BaseComponent implements DeleteResourceFacet {
+    /*
+      * There are two ways to delete the transaction, via:
+      * 1) invokeOperation, or
+      * 2) deleteResource
+      * But deleteResource does not provide any way of notifying the caller that the operation
+      * failed and the rhq console would then be missing the transaction (until the next
+      * update).
+      * So, until it's fixed, record whether or not it has already been deleted
+      */
+    private boolean deleted;
+
+    protected EmsConnection getEmsConnection() {
+        TransactionEngineComponent tm = (TransactionEngineComponent) getResourceContext().getParentResourceComponent();
+
+        return tm.getEmsConnection();
+    }
+
+    public AvailabilityType getAvailability() {
+        return (deleted ? AvailabilityType.DOWN : AvailabilityType.UP);
+    }
+
+    public void deleteResource() throws Exception {
+        try {
+            if (!deleted)
+                invokeOperation("remove", null);
+        } catch (Exception e) {
+            // TODO doing this produces a stack trace on the rhq console window - ask the rhq team to provide an error report
+//            throw new Exception("Unable to remove transaction: " + e.getMessage());
+        }
+    }
+
+    public OperationResult invokeOperation(String name, Configuration params)
+    {
+        if (!deleted) {
+            OperationResult res = super.invokeOperation(name, params);
+
+            if (res.getErrorMessage() == null)
+                deleted = true;
+
+            return res;
+        } else {
+            return new OperationResult("Transaction has already been deleted");
+        }
+    }
+
+    /**
+     * Transaction participants are represented by MBeans whose ObjectName is prefixed
+     * by the MBean name of the transaction. Using this fact this method performs
+     * an MBean query to select participants of this transaction only
+     * @return Ems Beans representing this transactions participants
+     */
+    public Collection<EmsBean> getParticipants() {
+        return getEmsConnection().queryBeans(getResourceContext().getResourceKey() + ",puid=*");
+    }
+}

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionDiscovery.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnEntryDiscoveryComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionDiscovery.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionDiscovery.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,47 @@
+package org.rhq.plugins.jbossts;
+
+
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Class for discovering transactions known to the parent Transaction Manager
+ */
+public class TransactionDiscovery implements ResourceDiscoveryComponent
+{
+    /**
+     *
+     * @param context the context includes such things as the parent resource as well as configuration from the
+     * rhq descriptor
+     * @return a set of transactions that are executing a transaction termination protocol
+     */
+    public Set discoverResources(ResourceDiscoveryContext context)
+    {
+        Set<DiscoveredResourceDetails> transactions = new HashSet<DiscoveredResourceDetails>();
+        TransactionEngineComponent parent = (TransactionEngineComponent) context.getParentResourceComponent();
+        String version = context.getDefaultPluginConfiguration().getSimpleValue("Version", "0.2");
+        String description = context.getDefaultPluginConfiguration().getSimpleValue("description", "A terminating transaction");
+
+        // the parent component representing the Transaction Manager knows how to discover completing transaction
+        for (EmsBean txn : parent.getTransactions()) {
+            String on = txn.getBeanName().getCanonicalName();
+
+            /*
+             * transaction records contain an itype name component whereas participants also
+             * contain a puid name component:
+             * "jboss.jta:type=ObjectStore,itype=<typename>,uid=<uid>,puid=<uid>"
+             */
+            if (on.indexOf("puid") == -1 && on.indexOf("itype") != -1)
+                transactions.add(new DiscoveredResourceDetails(
+                    context.getResourceType(), on, on, version,
+                    description, context.getDefaultPluginConfiguration(), null));
+        }
+
+        return transactions;
+    }
+}

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineComponent.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnEngineComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineComponent.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineComponent.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,109 @@
+/*
+* Jopr Management Platform
+* Copyright (C) 2005-2008 Red Hat, Inc.
+* All rights reserved.
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License, version 2, as
+* published by the Free Software Foundation, and/or the GNU Lesser
+* General Public License, version 2.1, also as published by the Free
+* Software Foundation.
+*
+* This program 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 General Public License and the GNU Lesser General Public License
+* for more details.
+*
+* You should have received a copy of the GNU General Public License
+* and the GNU Lesser General Public License along with this program;
+* if not, write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+package org.rhq.plugins.jbossts;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+import org.mc4j.ems.connection.bean.operation.EmsOperation;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * The management view of a Transaction Manager instance. By extending from MBeanResourceComponent
+ * the RHQ framework makes available an Ems (a kind of JMX wrapper) connection to the target system
+ * being managed.
+ */
+public class TransactionEngineComponent extends MBeanResourceComponent {
+    public static final String OS_BEAN = "jboss.jta:type=ObjectStore";
+    public static final String CE_BEAN = "jboss.jta:name=CoordinatorEnvironmentBean";
+    public static final String CORE_BEAN = "jboss.jta:name=CoreEnvironmentBean";
+
+    public static final String STATS_PROP = "EnableStatistics";
+    public static final String BUILD_ID_PROP = "BuildId";
+    public static final String BUILD_VER_PROP = "BuildVersion";
+
+    @Override
+    public Configuration loadResourceConfiguration() {
+        Configuration config = new Configuration();
+        EmsBean bean1 = getEmsConnection().getBean(CE_BEAN);
+        EmsBean bean2 = getEmsConnection().getBean(CORE_BEAN);
+
+        config.put(new PropertySimple(STATS_PROP, bean1.getAttribute(STATS_PROP).getValue()));
+        config.put(new PropertySimple(BUILD_ID_PROP, bean2.getAttribute(BUILD_ID_PROP).getValue()));
+        config.put(new PropertySimple(BUILD_VER_PROP, bean2.getAttribute(BUILD_VER_PROP).getValue()));
+
+        return config;
+    }
+
+    @Override
+    public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+        PropertySimple configProp = report.getConfiguration().getSimple(STATS_PROP);
+        EmsBean bean = getEmsConnection().getBean(CE_BEAN);
+
+        try {
+            bean.getAttribute(STATS_PROP).setValue(configProp.getBooleanValue());
+            report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+        } catch (Exception e) {
+            report.setStatus(ConfigurationUpdateStatus.FAILURE);
+            report.setErrorMessage("Error enabling/disabling statistics: " + e);
+        }
+    }
+
+    @Override
+    public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+        if ("probe".equals(name)) {
+            Collection<EmsBean> transactions = getTransactions();
+
+            return new OperationResult("Found " + transactions.size() + " transactions");
+        } else {
+            return super.invokeOperation(name, parameters);
+        }
+    }
+
+    /**
+     * Connect to the target JVM and find all completing transactions by
+     * invoking the probe() method of the ObjectStoreBrowser MBean
+     *
+     * @return transactions encapsulated as Ems Beans
+     */
+    public Collection<EmsBean> getTransactions() {
+        try {
+            // ask the MBean to update its view of which transactions are present
+            EmsOperation op = getEmsConnection().getBean(OS_BEAN).getOperation("probe");
+
+            op.invoke(new Object[0]);
+
+            return getEmsConnection().queryBeans(OS_BEAN + ",*");
+        } catch (Exception e) {
+            log.info("MBean query error: " + e);
+
+            return Collections.EMPTY_LIST;
+        }
+    }
+}

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineDiscovery.java (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/main/java/org/jboss/as/integration/jbossts/jopr/TxnEngineDiscoveryComponent.java)
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineDiscovery.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/TransactionEngineDiscovery.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,35 @@
+package org.rhq.plugins.jbossts;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A discovery class for transaction managers - there should generally be only one
+ */
+public class TransactionEngineDiscovery implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+    ResourceDiscoveryContext<MBeanResourceComponent> context;
+
+    public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) throws InvalidPluginConfigurationException {
+        Set<DiscoveredResourceDetails> engines = new HashSet<DiscoveredResourceDetails>();
+        String key = context.getDefaultPluginConfiguration().getSimpleValue("key", "TransactionManager1");
+        String name = context.getDefaultPluginConfiguration().getSimpleValue("name", "Transaction Engine");
+        String version = "0.2"; //context.getDefaultPluginConfiguration().getSimpleValue("Version", "0.1");
+        String description = context.getDefaultPluginConfiguration().getSimpleValue("description", "JBossTS Transaction Management");
+
+        DiscoveredResourceDetails res =  new DiscoveredResourceDetails(
+                context.getResourceType(), key, name, version, description,
+                context.getDefaultPluginConfiguration(), null);
+
+        this.context = context;
+
+        engines.add(res);
+
+        return engines;
+    }
+}

Added: labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/XMBeanResourceComponent.java
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/XMBeanResourceComponent.java	                        (rev 0)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/java/org/rhq/plugins/jbossts/XMBeanResourceComponent.java	2010-12-23 19:57:24 UTC (rev 36489)
@@ -0,0 +1,29 @@
+package org.rhq.plugins.jbossts;
+
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+import java.util.Iterator;
+import java.util.Map;
+
+public class XMBeanResourceComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+    @Override
+    public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+        // the default implementation ignores the readOnly attribute on the resource-configuration property so remove them from the report
+        Map<String, PropertyDefinition> propDefs = getResourceContext().getResourceType().getResourceConfigurationDefinition().getPropertyDefinitions();
+        Iterator<Property> piter = report.getConfiguration().getProperties().iterator();
+
+        while (piter.hasNext()) {
+            Property p = piter.next();
+
+            if (propDefs.containsKey(p.getName()) && propDefs.get(p.getName()).isReadOnly()) {
+                piter.remove();
+//                report.getConfiguration().remove(p.getName());
+            }
+        }
+
+        super.updateResourceConfiguration(report);
+    }
+}

Copied: labs/jbosstm/trunk/rhq-plugin/src/main/resources (from rev 36450, labs/jbosstm/trunk/rhq-plugin/src/resources)

Modified: labs/jbosstm/trunk/rhq-plugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- labs/jbosstm/trunk/rhq-plugin/src/resources/META-INF/rhq-plugin.xml	2010-12-17 11:45:51 UTC (rev 36450)
+++ labs/jbosstm/trunk/rhq-plugin/src/main/resources/META-INF/rhq-plugin.xml	2010-12-23 19:57:24 UTC (rev 36489)
@@ -1,401 +1,357 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8" ?>
 
-<!DOCTYPE plugin [
+<plugin name="JBossTS"
+        displayName="Transaction Services"
+        package="org.rhq.plugins.jbossts"
+        description="Provides transaction monitoring"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="urn:xmlns:rhq-plugin"
+        xmlns:c="urn:xmlns:rhq-configuration">
 
-<!ENTITY enginePluginConfig '
-	<plugin-configuration>
-		<c:simple-property name="jmxurl" default="service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi" description="The URL for contacting the JMX listener running on the monitored server" readOnly="true"/>
-		<c:simple-property name="key" default="TxnEngine1" readOnly="true"/>
-		<c:simple-property name="name" default="Transaction Engine" readOnly="true"/>
-		<c:simple-property name="version" default="0.1" readOnly="true"/>
-		<c:simple-property name="description" default="JBossTS Transaction System Management" readOnly="true"/>
-	</plugin-configuration>
-'>
-<!ENTITY objStorePluginConfig '
-	<plugin-configuration>
-		<c:simple-property name="key" default="TxnLog1" readOnly="true"/>
-		<c:simple-property name="name" default="Transaction Log" readOnly="true"/>
-		<c:simple-property name="version" default="0.1" readOnly="true"/>
-		<c:simple-property name="description" default="Transaction Logging: Transactions that have been prepared will appear as services below this entry and are removed once they successfully complete." readOnly="true"/>
-	</plugin-configuration>
-'>
+    <depends plugin="JMX" />
 
-<!ENTITY txnEntryPluginConfig '
-	<plugin-configuration>
-		<c:simple-property name="version" default="0.1" readOnly="true"/>
-		<c:simple-property name="description" default="A Terminating Transaction" readOnly="true"/>
-	</plugin-configuration>
-'>
+    <service name="Transaction Manager"
+             discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+             class="TransactionEngineComponent"
+             description="Transaction Management"
+             singleton="true">
 
-<!ENTITY txnParticipantPluginConfig '
-	<plugin-configuration>
-		<c:simple-property name="version" default="0.1" readOnly="true"/>
-		<c:simple-property name="description" default="A transaction participant (such as a database or a JMS queue)" readOnly="true"/>
-	</plugin-configuration>
-'>
+        <runs-inside>
+            <parent-resource-type name="JMX Server" plugin="JMX"/>
+            <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
+            <parent-resource-type name="JBossAS Server" plugin="JBossAS5"/>
+        </runs-inside>
 
-<!ENTITY globalResourceConfiguration '
-	<resource-configuration>
+        <plugin-configuration>
+            <c:simple-property name="objectName" readOnly="true" default="jboss.jta:name=TransactionStatistics"/>
+            <c:simple-property name="nameTemplate" default="Transaction Manager"/>
+            <c:simple-property name="descriptionTemplate" default="JBossTS Transaction Management"/>
+            <c:simple-property name="Version" default="0.2" readOnly="true"/>
+        </plugin-configuration>
 
-		<c:group name="CommonConfiguration" displayName="Common Configuration Options">
-			<c:simple-property name="EnableStatistics" description="Set to true to start recording transaction statistics. Note that enabling statistics may have a slight performance impact due to locking on the counter variables." displayName="Enable Transaction Statistics" required="true" readOnly="false"/>
-			<c:simple-property name="DefaultTimeout" description="The default interval after which a transaction may be considered for timeout, in seconds.  Note: depending on the reaper mode and workload, transactions may not be timed out immediately." displayName="DefaultTimeout" required="true" readOnly="true"/>
+        <operation name="probe" displayName="Scan Transaction Logs" description="Scan recovery logs looking for completing transactions">
+            <results>
+                <c:simple-property name="operationResult" type="string" description="Count of how many log records were detected"/>
+            </results>
+        </operation>
 
-			<c:simple-property name="AllowMultipleLastResources" description="True if multiple last (i.e. one-phase) resources are allowed in the same transaction or not." displayName="Allow Multiple Last Resources" required="true" readOnly="true"/>
-			<c:simple-property name="DisableMultipleLastResourcesWarning" description="True if the per-transaction warning on enlistment of multiple last resources is disabled or not." displayName="Disable Multiple Last Resources Warning" required="true" readOnly="true"/>
-			<c:simple-property name="BuildVersion" description="The version control tag of the source used" displayName="Build Version"  required="false" readOnly="true"/>
-			<c:simple-property name="BuildId" description=" The build identification line indicating the os name and version and build date" displayName="Build Id"  required="false" readOnly="true"/>
+        <metric property="NumberOfTransactions"
+                displayName="NumberOfTransactions"
+                description="the total number of transactions (top-level and nested) created since last restart"
+                displayType="summary"
+                defaultOn="true"
+                defaultInterval="10000"
+                measurementType="trendsup" dataType="measurement"/>
+        <metric property="NumberOfNestedTransactions"
+                displayName="NumberOfNestedTransactions"
+                description="the total number of nested (sub) transactions created"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
-		</c:group>
+        <metric property="NumberOfHeuristics"
+                displayName="NumberOfHeuristics"
+                description="the number of transactions which have terminated with heuristic outcomes"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
-		<c:group name="EngineConfiguration" displayName="Transaction Manager Options" hiddenByDefault="true">
-			<c:simple-property name="XaRollbackOptimization" description="True if connections associated to XAResources that fail during prepare should be cleaned up immediately. False for cleanup during phase two rollback." displayName="XA Rollback Optimization" required="true" readOnly="true"/>
-			<c:simple-property name="XaAssumeRecoveryComplete" description="if XAResources that cannot be recovered should be assumed to have completed.  WARNING: enabling this property is not recommended and may cause inconsistency if your recovery configuration is incorrect or resource managers are not available." displayName=" XA Assume Recovery Complete" required="true" readOnly="true"/>
-			<c:simple-property name="XaTransactionTimeoutEnabled" description="True if the transaction timeout is passed on to the enlisted XAResources." displayName="XA Transaction Timeout Enabled" required="true" readOnly="true"/>
+        <metric property="NumberOfCommittedTransactions"
+                displayName="NumberOfCommittedTransactions"
+                description="the number of committed transactions"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
-			<c:simple-property name="SupportSubtransactions" description="True if subtransactions are allowed." displayName="Support Subtransactions" required="true" readOnly="true"/>
-<!--
-			<c:simple-property name="UserTransactionJNDIContext" description="The JNDI bind name for the implementation of UserTransaction interface." displayName="UserTransaction JNDI Context" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionManagerJNDIContext" description="The JNDI bind name for the implementation of TransactionManager interface." displayName="TransactionManager JNDI Context" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionSynchronizationRegistryJNDIContext" description="The JNDI bind name for the implementation of TransactionSynchronizationRegistry interface." displayName="TransactionSynchronizationRegistry JNDI Context" required="true" readOnly="true"/>
--->		
-		</c:group>
+        <metric property="NumberOfAbortedTransactions"
+                displayName="NumberOfAbortedTransactions"
+                description="the number of aborted (i.e. rolledback) transactions"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
-		<c:group name="CoreEngineConfiguration" displayName="Core Transaction Manager" hiddenByDefault="true">
-			<c:simple-property name="VarDir" description="The var directory path." displayName="Var Dir" required="false" readOnly="true"/>
-			<c:simple-property name="NodeIdentifier" description="The Node Identifier." displayName="Node Identifier" required="false" readOnly="true"/>
-			<c:simple-property name="SocketProcessIdPort" description="The port number for the Socket based process id implementation." displayName="Socket ProcessId Port" required="false" readOnly="true"/>
-			<c:simple-property name="SocketProcessIdMaxPorts" description="The maximum number of ports to search when looking for one that is free." displayName="Socket ProcessId Max Ports" required="false" readOnly="true"/>
-			<c:simple-property name="ProcessImplementation" description="The class name of the Process implementation to use." displayName="Process Implementation" required="false" readOnly="true"/>
-			<c:simple-property name="Pid" description="The process id to use if ManualProcessId is selected. Should be uniq across all instances on the same host." displayName="Pid" required="false" readOnly="true"/>
+        <metric property="NumberOfInflightTransactions"
+                displayName="NumberOfInflightTransactions"
+                description="the number of transactions that have begun but not yet terminated"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
+        <metric property="NumberOfTimedOutTransactions"
+                displayName="NumberOfTimedOutTransactions"
+                description="the number of transactions that have rolled back due to timeout"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
-<!-- the following properties have been moved to group name="CommonConfiguration"
-    - note that moving properties into other groups may require that the relevant Object Names (the ones that implement the properties being moved) are passed to the implementation
-    org.jboss.as.integration.jbossts.jopr.updateResourceConfiguration(ObjectName ... beans)
-    - ideally it would be nice to pass the Object Name as part of the simple-property definition
+        <metric property="NumberOfApplicationRollbacks"
+                displayName="NumberOfApplicationRollbacks"
+                description="the number of transactions that have been rolled back by application request (including ones that have timed out)"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
-			<c:simple-property name="AllowMultipleLastResources" description="True if multiple last (i.e. one-phase) resources are allowed in the same transaction or not." displayName="Allow Multiple Last Resources" required="false" readOnly="true"/>
-			<c:simple-property name="DisableMultipleLastResourcesWarning" description="True if the per-transaction warning on enlistment of multiple last resources is disabled or not." displayName="Disable Multiple Last Resources Warning" required="false" readOnly="true"/>
-			<c:simple-property name="BuildVersion" description="The version control tag of the source used" displayName="Build Version"  required="false" readOnly="true"/>
-			<c:simple-property name="BuildId" description=" The build identification line indicating the os name and version and build date" displayName="Build Id"  required="false" readOnly="true"/>
+        <metric property="NumberOfResourceRollbacks"
+                displayName="NumberOfResourceRollbacks"
+                description="the number of transactions that rolled back due to resource (participant) failure"
+                measurementType="trendsup" dataType="measurement" displayType="summary"/>
 
--->
+        <resource-configuration>
+            <c:simple-property name="BuildId" type="string" displayName="Software build identification" required="false" readOnly="true"
+                               description="Indication of who built the release, on which date and on which machine"/>
+            <c:simple-property name="BuildVersion" type="string" displayName="Source code version control tag" required="false" readOnly="true"
+                               description="The version control tag of the source used for this build"/>
+            <c:simple-property name="EnableStatistics" type="boolean" displayName="Enable Statistics" required="true" readOnly="false"
+                               description="Start/stop collecting statistics"/>
+        </resource-configuration>
 
-<!-- TODO how do you display an array property in the JOPR console? -->
-			<c:simple-property name="XaRecoveryNodes" description="The set of node identifiers for which recovery will be performed." displayName="XA Recovery Node Ids" required="false" readOnly="true"/>
+        <service name="Coordinator Configuration"
+                 discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+                 class="XMBeanResourceComponent"
+                 description="Transaction Coordinator Configuration"
+                 singleton="true">
 
-		</c:group>
+            <plugin-configuration>
+                <c:simple-property name="objectName" readOnly="true" default="jboss.jta:name=CoordinatorEnvironmentBean"/>
+                <c:simple-property name="nameTemplate" default="Coordinator Configuration"/>
+                <c:simple-property name="descriptionTemplate" default="Configuration properties for the core transaction coordinator."/>
+                <c:simple-property name="Version" default="0.2" readOnly="true"/>
+            </plugin-configuration>
 
-		<c:group name="EngineConfigurationClasses" displayName="Transaction Manager Implementation Options" hiddenByDefault="true">
-			<c:simple-property name="LastResourceOptimisationInterface" description="The classname of the marker interface used to indicate a LastResource." displayName="Last Resource Optimisation Interface" required="false" readOnly="true"/>
+            <resource-configuration>
+                <c:simple-property name="EnableStatistics" type="boolean" description="transaction statistics should be recorded" displayName="EnableStatistics" required="true" readOnly="false"/>
 
-			<c:simple-property name="TransactionManagerClassName" description="The class name of the javax.transaction.TransactionManager implementation." displayName="TransactionManager Class Name" required="false" readOnly="true"/>
-			<c:simple-property name="UserTransactionClassName" displayName="User Transaction Class Name" required="false" readOnly="true"/>
-			<c:simple-property name="TransactionSynchronizationRegistryClassName" description="The class name of the javax.transaction.TransactionSynchronizationRegistry implementation." displayName="TransactionSynchronization Registry Class Name" required="false" readOnly="true"/>
+                <c:simple-property name="AsyncCommit" type="boolean" description="Enable asynchronous commit" displayName="AsyncCommit" required="false" readOnly="true"/>
+                <c:simple-property name="AsyncPrepare" type="boolean" description="Enable asynchronous prepare behaviour" displayName="AsyncPrepare" required="false" readOnly="true"/>
+                <c:simple-property name="AsyncRollback" type="boolean" description="Enable asynchronous rollback behaviour" displayName="AsyncRollback" required="false" readOnly="true"/>
 
-			<c:simple-property name="XaResourceMapClassNames" description="The set of XAResourceMap implementation class names used to configure XAException handling." displayName="XA ResourceMap Class Names" required="false" readOnly="true"/>
-			<c:simple-property name="XaResourceRecoveryClassNames" description="The set of XAResourceRecovery implementation class names, each of which may have configuration data appended to it." displayName="XA Resource Recovery Class Names" required="false" readOnly="true"/>
-			<c:simple-property name="XaResourceOrphanFilterClassNames" description="A list of names of classes that implement XAResourceOrphanFilter." displayName="XA Resource Orphan Filter Class Names" required="false" readOnly="true"/>
-		</c:group>
+                <c:simple-property name="CommitOnePhase" type="boolean" description="Enable one phase commit optimization" displayName="CommitOnePhase" required="false" readOnly="true"/>
+                <c:simple-property name="MaintainHeuristics" type="boolean" description="Indicates that heuristic outcomes should be recorded" displayName="MaintainHeuristics" required="false" readOnly="true"/>
 
-		<c:group name="CoordinatorConfiguration" displayName="Coordinator Options" hiddenByDefault="true">
-			<c:simple-property name="BeforeCompletionWhenRollbackOnly" description="True if beforeCompletion should be called on Synchronizations when completing transactions that are marked rollback only." displayName="BeforeCompletionWhenRollbackOnly" required="true" readOnly="true"/>
-			<c:simple-property name="ClassicPrepare" description="True is classic prepare handling is enabled, false otherwise." displayName="ClassicPrepare" required="true" readOnly="true"/>
-			<c:simple-property name="CommitOnePhase" description="True if one phase commit optimization is to be used." displayName="CommitOnePhase" required="true" readOnly="true"/>
-			<!--
-			<c:simple-property name="DefaultTimeout" description="The default interval after which a transaction may be considered for timeout, in seconds.  Note: depending on the reaper mode and workload, transactions may not be timed out immediately." displayName="DefaultTimeout" required="true" readOnly="true"/>
-			-->
-			<!--
-			<c:simple-property name="EnableStatistics" description="True if transaction statistics should be recorded.  Note: Enabling statistics may have a slight performance impact due to locking on the counter variables." displayName="EnableStatistics" required="true" readOnly="true"/>
-			-->
-			<c:simple-property name="MaintainHeuristics" description="True if heuristic outcomes should be recorded." displayName="MaintainHeuristics" required="true" readOnly="true"/>
-			<c:simple-property name="ReadonlyOptimisation" description="True if handling of read only resources should be optimized." displayName="ReadonlyOptimisation" required="true" readOnly="true"/>
-			<c:simple-property name="SharedTransactionLog" description="True if the transaction log sould be run in shared mode or not." displayName="SharedTransactionLog" required="true" readOnly="true"/>
-			<c:simple-property name="StartDisabled" description="True if the transaction manager should be created in a disabled state or not." displayName="StartDisabled" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionLog" description="True if the transaction log should be distinct from the action store." displayName="TransactionLog" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionStatusManagerEnable" description="True if the transaction status manager (TSM) service, needed for out of process recovery, should be provided or not." displayName="TransactionStatusManagerEnable" required="true" readOnly="true"/>
-			<c:simple-property name="TxReaperCancelFailWaitPeriod" description="The number of millisecs delay afer a worker thread is interrupted, before the reaper writes the it off as a zombie and starts a new thread." displayName="TxReaperCancelFailWaitPeriod" required="true" readOnly="true"/>
-			<c:simple-property name="TxReaperCancelWaitPeriod" description="The number of millisecs delay afer a cancel is scheduled, before the reaper tries to interrupt the worker thread executing the cancel." displayName="TxReaperCancelWaitPeriod" required="true" readOnly="true"/>
-			<c:simple-property name="TxReaperTimeout" description="The timeout (wakeup) interval of the reapers PERIODIC mode, in milliseconds." displayName="TxReaperMode" required="true" readOnly="true"/>
-			<c:simple-property name="TxReaperTimeout" displayName="TxReaperTimeout" required="true" readOnly="true"/>
-			<c:simple-property name="TxReaperZombieMax" description="The threshold for count of non-exited zombies at which the system starts logging error messages." displayName="TxReaperZombieMax" required="true" readOnly="true"/>
-			<c:simple-property name="WriteOptimisation" description="True if write optimisation is enabled, false otherwise." displayName="WriteOptimisation" required="true" readOnly="true"/>
-			<c:simple-property name="CheckedActionFactoryClassName" description="The class name of an implementation of CheckedActionFactory" displayName="CheckedActionFactoryClassName" required="true" readOnly="true"/>
-			<c:simple-property name="AlternativeRecordOrdering" description="Whether to use the alternative abstract record ordering. True if order abstract records on type first, or false if order on Uid first." displayName="Use alterntate record ordering" required="false" readOnly="true"/>
+                <c:simple-property name="WriteOptimisation" type="boolean" description="The write optimisation protocol should be used for PersistenceRecord" displayName="WriteOptimisation" required="false" readOnly="true"/>
 
-			<c:simple-property name="ActionStore" description="The symbolic name for the action store type." displayName="Action Store" required="true" readOnly="true"/>
-			<c:simple-property name="AsyncCommit" description="True if anynchronous commit behaviour is enabled." displayName="Async Commit" required="true" readOnly="true"/>
-			<c:simple-property name="AsyncPrepare" description="True if asynchronous prepare behaviour is enabled." displayName="Async Prepare" required="true" readOnly="true"/>
-			<c:simple-property name="AsyncRollback" description="True if asynchronous rollback behaviour is enabled." displayName="Async Rollback" required="true" readOnly="true"/>
-		</c:group>
+                <c:simple-property name="ReadonlyOptimisation" type="boolean" description="handling of read only resources should be optimized" displayName="ReadonlyOptimisation" required="false" readOnly="true"/>
+                <c:simple-property name="ClassicPrepare" type="boolean" description="the old style of prepare handling should be used for PersistenceRecord" displayName="ClassicPrepare" required="false" readOnly="true"/>
+                <c:simple-property name="SharedTransactionLog" type="boolean" description="the transaction log should be run in shared mode" displayName="SharedTransactionLog" required="false" readOnly="true"/>
+                <c:simple-property name="StartDisabled" type="boolean" description="the transaction manager should be created in a disabled state" displayName="StartDisabled" required="false" readOnly="true"/>
 
-		<c:group name="RecoveryConfiguration" displayName="Recovery System" hiddenByDefault="true">
 
-			<c:simple-property name="PeriodicRecoveryPeriod" description="The interval between recovery scans, in seconds." displayName="PeriodicRecoveryPeriod" required="true" readOnly="true"/>
-			<c:simple-property name="RecoveryBackoffPeriod" description="The interval between recovery phases within a recovery scan, in seconds." displayName="RecoveryBackoffPeriod" required="true" readOnly="true"/>
-			<c:simple-property name="RecoveryListener" description="True if the recovery system should listen on a network socket. False for local JVM only use." displayName="RecoveryListener" required="true" readOnly="true"/>
-			<c:simple-property name="RecoveryPort" description="The network port number on which the recovery listener should bind." displayName="RecoveryPort" required="true" readOnly="true"/>
-			<c:simple-property name="RecoveryAddress" description="The hostname on which the recovery listener shoud bind." displayName="RecoveryAddress" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionStatusManagerPort" description="The network port number on which the transaction status manager should bind." displayName="TransactionStatusManagerPort" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionStatusManagerAddress" description="The hostname on which the transaction status manager should bind." displayName="TransactionStatusManagerAddress" required="true" readOnly="true"/>
-			<c:simple-property name="ExpiryScanInterval" description="The interval on which the ObjectStore will be scanned for expired items, in hours." displayName="ExpiryScanInterval" required="true" readOnly="true"/>
-			<c:simple-property name="TransactionStatusManagerExpiryTime" description="The time period after which items will be considered to have expired, in hours." displayName="TimeoutSocket" required="true" readOnly="true"/>
-			<c:simple-property name="TimeoutSocket" description="True if SO_TIMEOUT should be set on Listener socket instances." displayName="TimeoutSocket" required="true" readOnly="true"/>
+                <c:simple-property name="TxReaperMode" type="string" description="the operating mode of the transaction timeout processing system" displayName="TxReaperMode" required="false" readOnly="true"/>
+                <c:simple-property name="TxReaperTimeout" type="long" description="the timeout (wakeup) interval of the reaper's PERIODIC mode, in milliseconds" displayName="TxReaperTimeout" required="false" readOnly="true"/>
+                <c:simple-property name="TxReaperCancelWaitPeriod" type="long" description="the number of millisecs delay afer a cancel is scheduled, before the reaper tries to interrupt the worker thread executing the cancel" displayName="TxReaperCancelWaitPeriod" required="false" readOnly="true"/>
+                <c:simple-property name="TxReaperCancelFailWaitPeriod" type="long" description="the number of millisecs delay afer a worker thread is interrupted, before the reaper writes the it off as a zombie and starts a new thread" displayName="TxReaperCancelFailWaitPeriod" required="false" readOnly="true"/>
+                <c:simple-property name="TxReaperZombieMax" type="integer" description="the threshold for count of non-exited zombies at which the system starts logging error messages" displayName="TxReaperZombieMax" required="false" readOnly="true"/>
+                <c:simple-property name="DefaultTimeout" type="integer" description="the default interval after which a transaction may be considered for timeout, in seconds (depending on the reaper mode and workload, transactions may not be timed out immediately)" displayName="DefaultTimeout" required="false" readOnly="true"/>
+                <c:simple-property name="TransactionStatusManagerEnable" type="boolean" description="Indicates whether the transaction status manager (TSM) service, needed for out of process recovery, should be provided or not" displayName="TransactionStatusManagerEnable" required="false" readOnly="true"/>
+                <c:simple-property name="BeforeCompletionWhenRollbackOnly" type="boolean" description="Should beforeCompletion should be called on Synchronizations when completing transactions that are marked rollback only" displayName="BeforeCompletionWhenRollbackOnly" required="false" readOnly="true"/>
+                <c:simple-property name="CheckedActionFactoryClassName" type="string" description="the class name of an implementation of CheckedActionFactory" displayName="CheckedActionFactoryClassName" required="false" readOnly="true"/>
+                <c:simple-property name="CommunicationStore" type="string" description="the symbolic name for the communication store type" displayName="CommunicationStore" required="false" readOnly="true"/>
 
-<!-- List<String> -->
-			<c:simple-property name="ExpiryScanners" description="A list of names of classes that implement ExpiryScanner." displayName="ExpiryScanners" required="false" readOnly="true"/>
-			<c:simple-property name="RecoveryExtensions" description="A list of names of classes that implement RecoveryModule." displayName="RecoveryExtensions" required="false" readOnly="true"/>
-			<c:simple-property name="RecoveryActivators" description="A list of names of classes that implement RecoveryActivator." displayName="RecoveryActivators" required="false" readOnly="true"/>
+            </resource-configuration>
+        </service>
 
-		</c:group>
+        <service name="Core Engine Configuration"
+                 discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+                 class="XMBeanResourceComponent"
+                 description="Assorted configuration properties for the core transaction system"
+                 singleton="true">
 
-		<c:group name="JDBCConfiguration" hiddenByDefault="true" displayName="JDBC Configuration">
-			<c:simple-property name="IsolationLevel" description="The default isolation level for tansactional database operations." displayName="Isolation Level" required="false" readOnly="true"/>
-		</c:group>
+            <plugin-configuration>
+                <c:simple-property name="objectName" readOnly="true" default="jboss.jta:name=CoreEnvironmentBean"/>
+                <c:simple-property name="nameTemplate" default="Core Environment Configuration"/>
+                <c:simple-property name="descriptionTemplate" default="Assorted configuration properties for the core transaction system."/>
+                <c:simple-property name="Version" default="0.2" readOnly="true"/>
+            </plugin-configuration>
 
-	<c:group name="JTSConfiguration" displayName="JTS Configuration" hiddenByDefault="true">
+            <resource-configuration>
+                <c:simple-property name="VarDir" type="string" description="the 'var' directory path." displayName="VarDir" required="false" readOnly="true"/>
+                <c:simple-property name="NodeIdentifier" type="string" description="the Node Identifier." displayName="NodeIdentifier" required="false" readOnly="true"/>
+                <c:simple-property name="SocketProcessIdPort" type="integer" description="the port number for the Socket based process id implementation." displayName="SocketProcessIdPort" required="false" readOnly="true"/>
+                <c:simple-property name="SocketProcessIdMaxPorts" type="integer" description="the maximum number of ports to search when looking for one that is free." displayName="SocketProcessIdMaxPorts" required="false" readOnly="true"/>
+                <c:simple-property name="ProcessImplementation" type="string" description="the class name of the Process implementation to use." displayName="ProcessImplementation" required="false" readOnly="true"/>
+                <c:simple-property name="Pid" type="integer" description="the process id to use if ManualProcessId is selected. Should be uniq across all instances on the same host." displayName="Pid" required="false" readOnly="true"/>
+                <c:simple-property name="AllowMultipleLastResources" type="boolean" description="true if multiple last (i.e. one-phase) resources are allowed in the same transaction or not." displayName="AllowMultipleLastResources" required="false" readOnly="true"/>
+                <c:simple-property name="DisableMultipleLastResourcesWarning" type="boolean" description="if the per-transaction warning on enlistment of multiple last resources is disabled or not." displayName="DisableMultipleLastResourcesWarning" required="false" readOnly="true"/>
+                <c:simple-property name="BuildVersion" type="string" description="the version control tag of the source used, or unknown" displayName="BuildVersion" required="false" readOnly="true"/>
+                <c:simple-property name="BuildId" type="string" description="the build identification line indicating the os name and version and build date" displayName="BuildId" required="false" readOnly="true"/>
+            </resource-configuration>
+        </service>
 
-		<c:simple-property name="UserTransactionClassName" description="The class name of the javax.transaction.UserTransaction implementation." displayName="TransactionManager"  required="false" readOnly="true"/>
-		<c:simple-property name="NeedTranContext" description="True if transaction context interceptors will require a context to be present." displayName="NeedTranContext"  required="false" readOnly="true"/>
-		<c:simple-property name="AlwaysPropagateContext" description="True if a transaction context should always be propagated on remote calls. False to propagate selectively." displayName="AlwaysPropagateContext"  required="false" readOnly="true"/>
-		<c:simple-property name="Interposition" description="The Xid format interposition strategy implementation class name." displayName="Interposition"  required="false" readOnly="true"/>
-		<c:simple-property name="CheckedTransactions" description="True if checked transactions should be used." displayName="CheckedTransactions"  required="false" readOnly="true"/>
-		<c:simple-property name="SupportSubtransactions" description="True if subtransactions should be used in the JTS. Note that this is distinct from the JTA module subtransaction option." displayName="SupportSubtransactions"  required="false" readOnly="true"/>
-		<c:simple-property name="SupportRollbackSync" description="True if Synchronizations should be fired on transaction rollback. Note: this is distinct from the coordinators beforeCompletionWhenRollbackOnly option." displayName="SupportRollbackSync"  required="false" readOnly="true"/>
-		<c:simple-property name="SupportInterposedSynchronization" description="True if Synchronizations can be interposed i.e. registered direct with the parent coordinator." displayName="SupportInterposedSynchronization"  required="false" readOnly="true"/>
-		<c:simple-property name="PropagateTerminator" description="True if a reference to the terminator should be included in the propagation context." displayName="PropagateTerminator"  required="false" readOnly="true"/>
-		<c:simple-property name="ContextPropMode" description="The name of the context propagation mode (CONTEXT or NONE)." displayName="ContextPropMode"  required="false" readOnly="true"/>
-		<c:simple-property name="RecoveryManagerPort" description="The port number on which the recovery manager will listen." displayName="RecoveryManagerPort"  required="false" readOnly="true"/>
-		<c:simple-property name="RecoveryManagerAddress" description="The hostname on which the recovery manager will bind." displayName="RecoveryManagerAddress"  required="false" readOnly="true"/>
-		<c:simple-property name="TimeoutPropagation" description="True if the timeout value sent should be the time remaining or not. true for OTS 1.2 (time remaining), false for backwards compatible (total time)" displayName="TimeoutPropagation"  required="false" readOnly="true"/>
-		<c:simple-property name="IssueRecoveryRollback" description="True if resources will have rollback invoked explicitly on them by recovery." displayName="IssueRecoveryRollback"  required="false" readOnly="true"/>
-		<c:simple-property name="CommitedTransactionRetryLimit" description="The number of attempts to make to notify resources of a transaction commit during recovery." displayName="CommitedTransactionRetryLimit"  required="false" readOnly="true"/>
+        <service name="Recovery Configuration"
+                 discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+                 class="XMBeanResourceComponent"
+                 description="Configuration properties for the recovery system"
+                 singleton="true">
 
-	</c:group>
+            <plugin-configuration>
+                <c:simple-property name="objectName" readOnly="true" default="jboss.jta:name=RecoveryEnvironmentBean"/>
+                <c:simple-property name="nameTemplate" default="Recovery Configuration"/>
+                <c:simple-property name="descriptionTemplate" default="Recovery Configuration."/>
+                <c:simple-property name="Version" default="0.2" readOnly="true"/>
+            </plugin-configuration>
 
-	<c:group name="OrbPortabilityConfiguration" displayName="Orb Portability Layer Configuration" hiddenByDefault="true">
-		<c:simple-property name="InitialReferencesRoot" description="The name of the directory in which the initial reference file is stored." displayName="Initial References Root"  required="false" readOnly="true"/>
-		<c:simple-property name="InitialReferencesFile" description="The relative name of the file in which initial references are stored." displayName="Initial References File"  required="false" readOnly="true"/>
-		<c:simple-property name="FileDir" description="The name of the directory to store reference files in." displayName="File Directory"  required="false" readOnly="true"/>
-		<c:simple-property name="ResolveService" description="The symbolic name of the configuration mechanism for resolving service references." displayName="Resolve Service"  required="false" readOnly="true"/>
-		<!--
-		     <c:simple-property name="EventHandlers" description="The classnames for the ORB object connect/disconnect event handlers." displayName="Event Handlers"  required="false" readOnly="true"/>
-	     -->
-		<c:simple-property name="OrbImplementation" description="The classname of the ORBImple implementation." displayName="Orb Implementation"  required="false" readOnly="true"/>
-		<c:simple-property name="OaImplementation" description="The classname of the POAImple implementation." displayName="Oa Implementation"  required="false" readOnly="true"/>
-		<c:simple-property name="BindMechanism" description="The symbolic name of the configuration mechanism used for service bindings." displayName="Bind Mechanism"  required="false" readOnly="true"/>
-		<!--
-		     <c:simple-property name="String> OrbInitializationProperties" description="The Map used for the orb initialization parameters. As there are potentially an arbitrary number of ORBs, each with an arbitrary set of initialization classes, it is not well suited to bean based properties." displayName="Orb Initialization Properties"  required="false" readOnly="true"/>
-     -->
+            <resource-configuration>
+                <c:simple-property name="PeriodicRecoveryPeriod" type="integer" displayName="PeriodicRecoveryPeriod" required="false" readOnly="true" description="the interval between recovery scans, in seconds."/>
+                <c:simple-property name="RecoveryBackoffPeriod" type="integer" displayName="RecoveryBackoffPeriod" required="false" readOnly="true" description="the interval between recovery phases within a recovery scan, in seconds."/>
+                <c:simple-property name="RecoveryListener" type="boolean" displayName="RecoveryListener" required="false" readOnly="true" description="true if the recovery system should listen on a network socket."/>
+                <c:simple-property name="RecoveryPort" type="integer" displayName="RecoveryPort" required="false" readOnly="true" description="the network port number on which the recovery listener should bind.
+"/>
+                <c:simple-property name="RecoveryAddress" type="string" displayName="RecoveryAddress" required="false" readOnly="true" description="the hostname on which the recovery listener shoud bind."/>
+                <c:simple-property name="TransactionStatusManagerPort" type="integer" displayName="TransactionStatusManagerPort" required="false" readOnly="true" description="the network port number on which the transaction status manager should bind."/>
+                <c:simple-property name="TransactionStatusManagerAddress" type="string" displayName="TransactionStatusManagerAddress" required="false" readOnly="true" description="the hostname on which the transaction status manager should bind."/>
+                <c:simple-property name="ExpiryScanInterval" type="integer" displayName="ExpiryScanInterval" required="false" readOnly="true" description="the interval on which the ObjectStore will be scanned for expired items, in hours. Default: 12 hours"/>
+                <c:simple-property name="TransactionStatusManagerExpiryTime" type="integer" displayName="TransactionStatusManagerExpiryTime" required="false" readOnly="true" description="the time period after which items will be considered to have expired, in hours. Default: 12 hours"/>
+                <c:simple-property name="TimeoutSocket" type="boolean" displayName="TimeoutSocket" required="false" readOnly="true" description="true if SO_TIMEOUT should be set on Listener socket instances."/>
 
-	</c:group>
+                <!-- the next three have type java.util.List -->
+                <c:simple-property name="ExpiryScanners" displayName="ExpiryScanners" required="false" readOnly="true" description="a list of names of classes that implement ExpiryScanner."/>
+                <c:simple-property name="RecoveryExtensions" displayName="RecoveryExtensions" required="false" readOnly="true" description="a list of names of classes that implement RecoveryModule.
+"/>
+                <c:simple-property name="RecoveryActivators" displayName="RecoveryActivators" required="false" readOnly="true" description="a list of names of classes that implement RecoveryActivator."/>
 
-	</resource-configuration>
-'>
+            </resource-configuration>
+        </service>
 
-<!ENTITY generalTraits '
-	<metric property="BuildId"
-			displayName="Sofware build identification"
-			description="Indication of who built the release, on which date and on which machine"
-			dataType="trait" displayType="summary"/>
-	<metric property="BuildVersion"
-			displayName="Source code version control tag"
-			description="The version control tag of the source used for this build"
-			dataType="trait" displayType="summary"/>
-'>
+        <service name="JTA Configuration"
+                 discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+                 class="XMBeanResourceComponent"
+                 description="Configuration properties for the JTA subsystem"
+                 singleton="true">
 
-<!ENTITY txStatsMetrics '
-	<metric property="NumberOfTransactions"
-			displayName="NumberOfTransactions"
-			description="the total number of transactions (top-level and nested) created since last restart"
-			displayType="summary"
-			defaultOn="true"
-			defaultInterval="10000"
-			measurementType="trendsup" dataType="measurement"/>
-<!--
-	<metric property="numberOfTransactions"
-			category="utilization"
-			measurementType="trendsup"/>
--->
-	<metric property="NumberOfNestedTransactions"
-			displayName="NumberOfNestedTransactions"
-			description="the total number of nested (sub) transactions created"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+            <plugin-configuration>
+                <c:simple-property name="objectName" readOnly="true" default="jboss.jta:name=JTAEnvironmentBean"/>
+                <c:simple-property name="nameTemplate" default="JTA Configuration"/>
+                <c:simple-property name="descriptionTemplate" default="Configuration properties for the JTA subsystem"/>
+                <c:simple-property name="Version" default="0.2" readOnly="true"/>
+            </plugin-configuration>
 
-	<metric property="NumberOfHeuristics"
-			displayName="NumberOfHeuristics"
-			description="the number of transactions which have terminated with heuristic outcomes"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+            <resource-configuration>
+                <c:simple-property name="SupportSubtransactions" type="boolean" displayName="SupportSubtransactions" required="false" readOnly="true" description="indicates whether subtransactions are allowed. Warning: subtransactions are not JTA spec compliant and most XA resource managers don't understand them."/>
+                <c:simple-property name="TransactionManagerClassName" type="string" displayName="TransactionManagerClassName" required="false" readOnly="true" description="the class name of the javax.transaction.TransactionManager implementation."/>
 
-	<metric property="NumberOfCommittedTransactions"
-			displayName="NumberOfCommittedTransactions"
-			description="the number of committed transactions"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+                <c:simple-property name="UserTransactionClassName" type="string" displayName="UserTransactionClassName" required="false" readOnly="true" description="the class name of the javax.transaction.UserTransaction implementation."/>
+                <c:simple-property name="TransactionSynchronizationRegistryClassName" type="string" displayName="TransactionSynchronizationRegistryClassName" required="false" readOnly="true" description="the class name of the javax.transaction.TransactionSynchronizationRegistry implementation."/>
+                <c:simple-property name="XaRollbackOptimization" type="boolean" displayName="XaRollbackOptimization" required="false" readOnly="true" description="Returns if connections associated to XAResources that fail during prepare should be cleaned up immediately."/>
+                <c:simple-property name="XaAssumeRecoveryComplete" type="boolean" displayName="XaAssumeRecoveryComplete" required="false" readOnly="true" description="indicates whether XAResources that can't be recovered should be assumed to have completed. WARNING: enabling this property is not recommended and may cause inconsistency if your recovery configuration is incorrect or resource managers are not available."/>
+                <c:simple-property name="UserTransactionJNDIContext" type="string" displayName="UserTransactionJNDIContext" required="false" readOnly="true" description="the JNDI bind name for the implementation of UserTransaction."/>
+                <c:simple-property name="TransactionManagerJNDIContext" type="string" displayName="TransactionManagerJNDIContext" required="false" readOnly="true" description="the JNDI bind name for the implementation of TransactionManager."/>
+                <c:simple-property name="TransactionSynchronizationRegistryJNDIContext" type="string" displayName="TransactionSynchronizationRegistryJNDIContext" required="false" readOnly="true" description="the JNDI bind name for the implementation of TransactionSynchronizationRegistry."/>
+                <c:simple-property name="XaTransactionTimeoutEnabled" type="boolean" displayName="XaTransactionTimeoutEnabled" required="false" readOnly="true" description="indicates whether the transaction timeout is passed on to the enlisted XAResources"/>
+                <c:simple-property name="LastResourceOptimisationInterface" type="string" displayName="LastResourceOptimisationInterface" required="false" readOnly="true" description="the classname of the marker interface used to indicate a LastResource."/>
 
-	<metric property="NumberOfAbortedTransactions"
-			displayName="NumberOfAbortedTransactions"
-			description="the number of aborted (i.e. rolledback) transactions"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+                <!-- the next four have type java.util.List<String> -->
+                <c:simple-property name="XaRecoveryNodes" displayName="XaRecoveryNodes" required="false" readOnly="true" description="Returns the set of node identifiers for which recovery will be performed."/>
+                <c:simple-property name="XaResourceRecoveryClassNames" displayName="XaResourceRecoveryClassNames" required="false" readOnly="true" description="the set of XAResourceRecovery implementation class names, each of which may have configuration data appended to it."/>
+                <c:simple-property name="XaResourceOrphanFilterClassNames" displayName="XaResourceOrphanFilterClassNames" required="false" readOnly="true" description="Returns a list of names of classes that implement XAResourceOrphanFilter."/>
+                <c:simple-property name="XaResourceMapClassNames" displayName="XaResourceMapClassNames" required="false" readOnly="true" description="the set of XAResourceMap implementation class names used to configure XAException handling."/>
 
-	<metric property="NumberOfInflightTransactions"
-			displayName="NumberOfInflightTransactions"
-			description="the number of transactions that have begun but not yet terminated"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+                <!-- these properties are for complex times (ie not supported)
+                TransactionManager getTransactionManager()
+                UserTransaction getUserTransaction()
+                TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
+                List<XAResourceRecovery> getXaResourceRecoveries()
+                List<XAResourceOrphanFilter> getXaResourceOrphanFilters()
+                List<XAResourceMap> getXaResourceMaps()
+                -->
+            </resource-configuration>
+        </service>
 
-	<metric property="NumberOfTimedOutTransactions"
-			displayName="NumberOfTimedOutTransactions"
-			description="the number of transactions that have rolled back due to timeout"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+        <service name="ObjectStore Configuration"
+                 discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
+                 class="XMBeanResourceComponent"
+                 description="Configuration properties for the object store and its various implementations"
+                 singleton="true">
 
-	<metric property="NumberOfApplicationRollbacks"
-			displayName="NumberOfApplicationRollbacks"
-			description="the number of transactions that have been rolled back by application request (including ones that have timed out)"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
+            <plugin-configuration>
+                <c:simple-property name="objectName" readOnly="true" default="jboss.jta:name=ActionStoreObjectStoreEnvironmentBean"/>
+                <c:simple-property name="nameTemplate" default="ObjectStore Configuration"/>
+                <c:simple-property name="descriptionTemplate" default="Configuration properties for the object store and its various implementations"/>
+                <c:simple-property name="Version" default="0.2" readOnly="true"/>
+                <c:simple-property name="version" default="x0.2" readOnly="true"/>
+            </plugin-configuration>
 
-	<metric property="NumberOfResourceRollbacks"
-			displayName="NumberOfResourceRollbacks"
-			description="the number of transactions that rolled back due to resource (participant) failure"
-			measurementType="trendsup" dataType="measurement" displayType="summary"/>
-'>
+            <resource-configuration>
+                <c:simple-property name="CacheStoreSize" type="integer" displayName="CacheStoreSize" required="false" readOnly="true" description="Returns the maximum allowed size, in bytes, of the cache store's in-memory cache."/>
+                <c:simple-property name="CacheStoreSync" type="boolean" displayName="CacheStoreSync" required="false" readOnly="true" description="Returns true if writes to the objectstore should include a disk sync. Unlikely to be worthwile since the store caches state in memory anyhow."/>
+                <c:simple-property name="CacheStoreRemovedItems" type="integer" displayName="CacheStoreRemovedItems" required="false" readOnly="true" description="Returns the maximum number of removed items that may be held in the cache before being purged."/>
+                <c:simple-property name="CacheStoreScanPeriod" type="integer" displayName="CacheStoreScanPeriod" required="false" readOnly="true" description="Returns the interval on which the cache will wake and process outstanding work. Default: 120000 milliseconds"/>
+                <c:simple-property name="CacheStoreWorkItems" type="integer" displayName="CacheStoreWorkItems" required="false" readOnly="true" description="Returns the maximum number of outstanding writes that may be held in the cache. Default: 100"/>
+                <c:simple-property name="CacheStoreHash" type="integer" displayName="CacheStoreHash" required="false" readOnly="true" description="Returns the number of hash buckets used for the cache work queue. Default: 128"/>
+                <c:simple-property name="LocalOSRoot" type="string" displayName="LocalOSRoot" required="false" readOnly="true" description="Returns the local ObjectStore root directory name. This should be a path element, not a complete path. Default: defaultStore"/>
+                <c:simple-property name="ObjectStoreDir" type="string" displayName="ObjectStoreDir" required="false" readOnly="true" description="Returns the ObjectStore directory path. Default: {user.dir}/ObjectStore"/>
+                <c:simple-property name="ObjectStoreSync" type="boolean" displayName="ObjectStoreSync" required="false" readOnly="true" description="Returns true if ObjectStore operations should be synched to disk. Note that this value may be overridden by store implementation specific configuration. See also: TransactionSync Default: true"/>
+                <c:simple-property name="ObjectStoreType" type="string" displayName="ObjectStoreType" required="false" readOnly="true" description="Returns the symbolic name for the ObjectStore implementation. Default: ShadowNoFileLockStore TODO test"/>
+                <c:simple-property name="HashedDirectories" type="integer" displayName="HashedDirectories" required="false" readOnly="true" description="Returns the number of directories over which the ObjectStore contents will be distributed. Splitting the contents is important for performance on some file systems, as it reduces chain length (number of items in a directory) and directory lock contention. Default: 255"/>
+                <c:simple-property name="TransactionSync" type="boolean" displayName="TransactionSync" required="false" readOnly="true" description="Returns true if transaction log operations should be synched to disk. Default: true"/>
+                <c:simple-property name="Share" type="integer" displayName="Share" required="false" readOnly="true" description="Returns the share mode for the ObjectStore, i.e., is this being shared between VMs? Default: ObjectStore.OS_UNKNOWN"/>
+                <c:simple-property name="HierarchyRetry" type="integer" displayName="HierarchyRetry" required="false" readOnly="true" description="Returns the maximum number of attempts which may be made to create a file path in the store. Default: 100"/>
+                <c:simple-property name="HierarchyTimeout" type="integer" displayName="HierarchyTimeout" required="false" readOnly="true" description="Returns true if the LogStore should write removal records synchronously. Disabling this may increase performance at the cost of recovery complexity. Default: true"/>
+                <c:simple-property name="SynchronousRemoval" type="boolean" displayName="SynchronousRemoval" required="false" readOnly="true" description="Returns the time in milliseconds to wait between file creation retries. Default: 100 milliseconds."/>
+                <c:simple-property name="TxLogSize" type="long" displayName="TxLogSize" required="false" readOnly="true" description="Returns the default size of the LogStore file, in bytes. Default: 10MB"/>
+                <c:simple-property name="PurgeTime" type="long" displayName="PurgeTime" required="false" readOnly="true" description="Returns the purge interval for the LogStore, in milliseconds. Default: 100000 milliseconds"/>
+            </resource-configuration>
+        </service>
 
-<!ENTITY objStoreConfiguration '
-	<resource-configuration>
-		<c:group name="ObjStoreConfiguration" displayName="Transaction Log Configuration">
-			<c:simple-property name="ObjectStoreDir" description="The filesystem location of the ObjectStore" displayName="ObjectStore Directory" readOnly="true"/>
-			<c:simple-property name="ObjectStoreType" description="The type of the ObjectStore" displayName="ObjectStore Type" readOnly="true"/>
-			<c:simple-property name="LocalOSRoot" description="The local ObjectStore root directory name. This should be a path element, not a complete path." displayName="Local OS Root" readOnly="true"/>
-			<c:simple-property name="ObjectStoreSync" description="True if ObjectStore operations should be synched to disk. Note that this value may be overridden by store implementation specific configuration. See also: TransactionSync" displayName="ObjectStore Sync" readOnly="true"/>
-			<c:simple-property name="TransactionSync" description="True if transaction log operations should be synched to disk or not. Caution: Disabling this may be lead to non-ACID transaction behaviour." displayName="Transaction Sync" readOnly="true"/>
-			<c:simple-property name="HashedDirectories" description="The number of directories over which the ObjectStore contents will be distributed. Splitting the contents is important for performance on some file systems, as it reduces chain length ie the number of items in a directory, and directory lock contention." displayName="Number of Hashed Directories" readOnly="true"/>
-			<c:simple-property name="Share" description="The share mode for the ObjectStore, i.e., is this being shared  between VMs? For definition of the values @see com.arjuna.ats.arjuna.objectstore.StateStatus.stateStatusString()" displayName="Share" readOnly="true"/>
-			<c:simple-property name="HierarchyRetry" description="The maximum number of attempts which may be made to create a file path in the store." displayName="HierarchyRetry" readOnly="true"/>
-			<c:simple-property name="HierarchyTimeout" description="The time in milliseconds to wait between file creation retries." displayName="Hierarchy Timeout" readOnly="true"/>
-		</c:group>
+        <service name="Transaction"
+                 discovery="TransactionDiscovery"
+                 class="TransactionComponent"
+                 createDeletePolicy="delete-only"
+                 description="Completing Transactions"
+                 singleton="false">
 
-	</resource-configuration>
-'>
+            <plugin-configuration>
+                <c:simple-property name="Version" default="0.2" readOnly="true"/>
+                <c:simple-property name="description" default="A Terminating Transaction" readOnly="true"/>
+            </plugin-configuration>
 
-<!ENTITY objStoreEntryMetrics '
+            <operation name="remove" displayName="Remove Transaction" description="Tell the Transaction Manager to remove this action and all its participants">
+                <results><c:simple-property name="operationResult" type="string" description="Indication of whether the transaction was removed"/></results>
+            </operation>
 
-	<metric property="CreationTime"
-		displayName="CreationTime"
-		description="Time when the txn was prepared"
-		dataType="trait" displayType="summary"/>
-	<metric property="AgeInSeconds"
-		displayName="AgeInSeconds"
-		description="The elapsed time since prepare was called on this transaction"
-		units="seconds"
-		measurementType="trendsup" dataType="measurement" displayType="summary"/>
+            <metric property="CreationTime"
+                    displayName="CreationTime"
+                    description="Time when the txn was prepared"
+                    dataType="trait" displayType="summary"/>
+            <metric property="AgeInSeconds"
+                    displayName="AgeInSeconds"
+                    description="The elapsed time since prepare was called on this transaction"
+                    units="seconds"
+                    dataType="trait" displayType="summary"/>
 
-'>
+            <service name="Participant"
+                     discovery="ParticipantDiscovery"
+                     class="ParticipantComponent"
+                     singleton="false">
 
-<!ENTITY participantMetrics '
-	<metric property="Status"
-		displayName="Status"
-		description="Reports the commitment status of this participant (can be one of Pending, Prepared, Failed, Heuristic or Readonly)"
-		dataType="trait" displayType="summary"/>
-	<metric property="Type"
-		displayName="Type"
-		description="The record type used for storing this transaction"
-		dataType="trait" displayType="detail"/>
-	<metric property="ClassName"
-		displayName="XA Resource Class Name"
-		description="The java type that implements this XAResource"
-		dataType="trait" displayType="detail"/>
-	<metric property="EisProductName"
-		displayName="JNDI Name"
-		description="JNDI name of the JCA resource"
-		dataType="trait" displayType="summary"/>
-	<metric property="EisProductVersion"
-		displayName="Product Version"
-		description="JCA product version"
-		dataType="trait" displayType="summary"/>
-	<metric property="Timeout"
-		displayName="Timeout"
-		description="The number of seconds before the resource can rollback the branch"
-		units="seconds" dataType="trait" displayType="detail"/>
- '>
+                <plugin-configuration>
+                    <c:simple-property name="Version" default="0.2" readOnly="true"/>
+                    <c:simple-property name="description" default="A Transaction Participant" readOnly="true"/>
+                </plugin-configuration>
 
-]>
+                <operation name="setStatus" displayName="Clear Heuristic" description="Modify the status of this participant. This operation is most useful in
+                     those cases where the participant generated a heuristic  outcome and the administrator wants the Transaction manager to re-run phase 2 of
+                     the commitment protocol.">
+                    <parameters>
+                        <c:simple-property required="true" name="status" displayName="New status">
+                            <c:property-options>
+                                <c:option value="PREPARED" default="true"/>
+                                <c:option value="HEURISTIC"/>
+                            </c:property-options>
+                        </c:simple-property>
+                    </parameters>
+                    <results><c:simple-property name="operationResult" type="string" description="Indication of whether the status was modified"/></results>
+                </operation>
 
-<plugin name="JBossTS"
-		displayName="JBossTSPlugin"
-		description="Supports management and monitoring of JBossTS transaction managers"
-		package="org.jboss.as.integration.jbossts.jopr"
-		version="0.1"
-		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		xmlns="urn:xmlns:rhq-plugin"
-		xmlns:c="urn:xmlns:rhq-configuration">
-
-	<service name="TX Engine"
-			 description="Supports management and monitoring of JBossTS transaction managers"
-			 discovery="TxnEngineDiscoveryComponent"
-			 class="TxnEngineComponent"
-			 singleton="true">
-
-		<runs-inside>
-			<parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
-			<parent-resource-type name="JBossAS Server" plugin="JBossAS5"/>
-		</runs-inside>
-
-		&enginePluginConfig;
-		&generalTraits;
-		&txStatsMetrics;
-		&globalResourceConfiguration;
-
-		<service name="Transaction Log"
-				 discovery="TxnStoreDiscoveryComponent"
-				 class="TxnStoreComponent"
-				 singleton="true">
-			<!--
-			<operation name="refresh" displayName="Find Transactions" description="Resynchronize view of unresolved transactions">
-				<results><c:simple-property name="operationResult" type="string" description="Indication of whether there were changes"/></results>
-			</operation>
-			-->
-
-			&objStorePluginConfig;
-			&objStoreConfiguration;
-
-			<service name="Transaction Entries"
-					 discovery="TxnEntryDiscoveryComponent"
-					 class="TxnEntryComponent"
-					 createDeletePolicy="delete-only"
-					 singleton="false">
-
-				&txnEntryPluginConfig;
-				<operation name="remove" displayName="Remove Transaction" description="Tell the Transaction Manager to remove this action">
-					<results><c:simple-property name="operationResult" type="string" description="Indication of whether the transaction was removed"/></results>
-				</operation>
-
-				&objStoreEntryMetrics;
-
-				<service name="Transaction Participants"
-						 discovery="TxnParticipantDiscoveryComponent"
-						 class="TxnParticipantComponent"
-						 singleton="false">
-
-					&txnParticipantPluginConfig;
-
-					<operation name="setStatus" displayName="Clear Heuristic" description="Modify the status of this participant. This operation is most useful in
-					 those cases where the participant generated a heuristic  outcome and the administrator wants the Transaction manager to re-run phase 2 of
-					 the commitment protocol.">
-						<parameters>
-							<c:simple-property required="true" name="status" displayName="New status">
-								<c:property-options>
-									<c:option value="PREPARED" default="true"/>
-									<c:option value="HEURISTIC"/>
-								</c:property-options>
-							</c:simple-property>
-						</parameters>
-						<results><c:simple-property name="operationResult" type="string" description="Indication of whether the status was modified"/></results>
-					</operation>
-
-					&participantMetrics;
-				</service>
-			</service>
-
-		</service>
-
-	</service>
-
+                <metric property="Status"
+                        displayName="Status"
+                        description="Reports the commitment status of this participant (can be one of Pending, Prepared, Failed, Heuristic or Readonly)"
+                        dataType="trait" displayType="summary"/>
+                <metric property="Type"
+                        displayName="Type"
+                        description="The record type used for storing this transaction"
+                        dataType="trait" displayType="detail"/>
+                <metric property="ClassName"
+                        displayName="XA Resource Class Name"
+                        description="The java type that implements this XAResource"
+                        dataType="trait" displayType="detail"/>
+                <metric property="EisProductName"
+                        displayName="JNDI Name"
+                        description="JNDI name of the JCA resource"
+                        dataType="trait" displayType="summary"/>
+                <metric property="EisProductVersion"
+                        displayName="Product Version"
+                        description="JCA product version"
+                        dataType="trait" displayType="summary"/>
+                <metric property="Timeout"
+                        displayName="Timeout"
+                        description="The number of seconds before the resource can rollback the branch"
+                        units="seconds" dataType="trait" displayType="detail"/>
+            </service>
+        </service>
+    </service>
 </plugin>



More information about the jboss-svn-commits mailing list