[jboss-cvs] JBossAS SVN: r100348 - in branches/Branch_Hornet_Temporary_2/hornetq-int/src: main/java/org/jboss/as/integration/hornetq/jopr/util and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 3 10:24:40 EST 2010


Author: ataylor
Date: 2010-02-03 10:24:39 -0500 (Wed, 03 Feb 2010)
New Revision: 100348

Added:
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java
Removed:
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java
Modified:
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/MBeanUtil.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml
Log:
simplified components

Added: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -0,0 +1,276 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.jboss.as.integration.hornetq.jopr.util.MBeanUtil;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.*;
+import org.rhq.core.domain.measurement.*;
+import org.rhq.core.domain.operation.OperationDefinition;
+import org.rhq.core.domain.resource.ResourceType;
+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 javax.management.ObjectName;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created Feb 2, 2010
+ */
+public class HornetQComponent implements ResourceComponent, MeasurementFacet, OperationFacet
+{
+   private MBeanUtil util;
+
+   private ObjectName objectName;
+
+   private ResultsFormatter resultsFormatter;
+
+   private ResourceContext resourceContext;
+
+   public void getValues(final MeasurementReport report, final Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
+   {
+      for (MeasurementScheduleRequest request : measurementScheduleRequests)
+      {
+         if(DataType.TRAIT.equals(request.getDataType()))
+         {
+            Object attr = util.getAttribute(objectName, request.getName());
+            String data;
+            if(attr instanceof Object[])
+            {
+               Object[] objects = (Object[]) attr;
+               StringBuilder sb = new StringBuilder();
+               for (int i = 0, objectsLength = objects.length; i < objectsLength; i++)
+               {
+                  Object object = objects[i];
+                  if(i > 0)
+                  {
+                     sb.append(", ");
+                  }
+                  sb.append(object.toString());
+               }
+               data = sb.toString();
+            }
+            else
+            {
+               data = attr.toString();
+            }
+            report.addData(new MeasurementDataTrait(request, data));
+         }
+      }
+   }
+
+   public OperationResult invokeOperation(final String oper, final Configuration configuration) throws InterruptedException, Exception
+   {
+      Operation operation = Operation.getOperation(oper);
+      Collection<PropertySimple> props = configuration.getSimpleProperties().values();
+      Object o = util.invoke(objectName, operation.getOperationName(), props);
+      return resultsFormatter.formatResults(operation, o, resourceContext);
+   }
+
+   public void start(final ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
+   {
+      PropertySimple objectNameProperty = resourceContext.getPluginConfiguration().getSimpleProperties().get("objectName");
+      if(objectNameProperty == null)
+      {
+         throw new InvalidPluginConfigurationException("objectName should be configured on service " + resourceContext.getResourceKey());
+      }
+      String mBeanName = objectNameProperty.getStringValue();
+      PropertySimple useResourceKeyForNameProperty = resourceContext.getPluginConfiguration().getSimpleProperties().get("useResourceKeyForName");
+      Boolean useResourceKeyForName = useResourceKeyForNameProperty == null? false:useResourceKeyForNameProperty.getBooleanValue();
+      if(useResourceKeyForName)
+      {
+         objectName = new ObjectName(mBeanName + ",name=" + resourceContext.getResourceKey().split(":")[1]);
+      }
+      else
+      {
+         objectName = new ObjectName(mBeanName);
+      }
+      util = new MBeanUtil();
+      this.resourceContext = resourceContext;
+      resultsFormatter = new ResultsFormatter();
+   }
+
+   public void stop()
+   {
+
+   }
+
+   public AvailabilityType getAvailability()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   static class Operation
+   {
+      final private String operationName;
+      final private String resultsType;
+
+      Operation(String operationName, String resultsType)
+      {
+         this.operationName = operationName;
+         this.resultsType = resultsType;
+      }
+
+      public String getOperationName()
+      {
+         return operationName;
+      }
+
+      public String getResultsType()
+      {
+         return resultsType;
+      }
+
+      static Operation getOperation(String oper)
+      {
+         String[] split = oper.split(",", 3);
+         String operationName = split[0];
+         String resultsType = null;
+         for (int i = 1, splitLength = split.length; i < splitLength; i++)
+         {
+            String s = split[i];
+            if(s.startsWith("operation"))
+            {
+               operationName = s.substring(s.indexOf("=") + 1);
+            }
+            else if(s.startsWith("result"))
+            {
+               resultsType = s.substring(s.indexOf("=") + 1);
+            }
+         }
+         return new Operation(operationName, resultsType);
+      }
+   }
+
+   static class ResultsFormatter
+   {
+      OperationResult formatResults(final Operation oper, final Object result, final ResourceContext resourceContext)
+      {
+         if (result == null)
+         {
+            return null;
+         }
+         else
+         {
+
+            if (oper.getResultsType() == null)
+            {
+               return formatStringResults(result.toString());
+            }
+            else
+            {
+               if ("String".equalsIgnoreCase(oper.getResultsType()))
+               {
+                  return formatStringResults(result.toString());
+               }
+               else if ("JMSMessage".equalsIgnoreCase(oper.getResultsType()))
+               {
+                  return formatJmsMessageResults(result);
+               }
+               else if ("String[]".equalsIgnoreCase(oper.getResultsType()))
+               {
+                  return formatStringArrayResults(result);
+               }
+               else
+               {
+                  return formatStringResults(result.toString());
+               }
+            }
+         }
+      }
+
+      OperationResult formatStringResults(final Object result)
+      {
+         return new OperationResult((String) result);
+      }
+
+      OperationResult formatJmsMessageResults(final Object result)
+      {
+         OperationResult operationResult = new OperationResult();
+         Configuration c = operationResult.getComplexResults();
+         PropertyList property = new PropertyList("result");
+         Map[] map = (Map[]) result;
+         for (Map map1 : map)
+         {
+            org.rhq.core.domain.configuration.PropertyMap p1 = new org.rhq.core.domain.configuration.PropertyMap("element");
+            property.add(p1);
+            for (Object o1 : map1.keySet())
+            {
+               p1.put(new PropertySimple((String) o1, map1.get(o1)));
+            }
+         }
+         c.put(property);
+         return operationResult;
+      }
+
+      OperationResult formatStringArrayResults(final Object result)
+      {
+         OperationResult operationResult = new OperationResult();
+         Configuration c = operationResult.getComplexResults();
+         PropertyList property = new PropertyList("result");
+         String[] Strings = (String[]) result;
+         property.add(new PropertySimple("element", "test"));
+         for (String string : Strings)
+         {
+            property.add(new PropertySimple("element", string));
+         }
+         c.put(property);
+         return operationResult;
+      }
+   }
+
+
+   private static OperationDefinition getOperationDefinition(final String operationName, final ResourceContext resourceContext)
+   {
+      ResourceType resourceType = resourceContext.getResourceType();
+      OperationDefinition operationDefinition = getOperationDefinition(resourceType, operationName);
+      if (operationDefinition == null)
+         throw new IllegalStateException("Operation named '" + operationName
+               + "' is not defined for Resource type '" + resourceType.getName() + "' in the '"
+               + resourceType.getPlugin() + "' plugin's descriptor.");
+      return operationDefinition;
+   }
+
+   public static Configuration getDefaultPluginConfiguration(final ResourceType resourceType)
+   {
+      ConfigurationDefinition pluginConfigurationDefinition = resourceType.getPluginConfigurationDefinition();
+      if (pluginConfigurationDefinition != null)
+      {
+         ConfigurationTemplate template = pluginConfigurationDefinition.getDefaultTemplate();
+         if (template != null)
+            return template.getConfiguration().deepCopy();
+      }
+      return new Configuration(); // there is no default plugin config defined - return an empty one
+   }
+
+   public static OperationDefinition getOperationDefinition(final ResourceType resourceType, final String operationName)
+   {
+      Set<OperationDefinition> operationDefinitions = resourceType.getOperationDefinitions();
+      for (OperationDefinition operationDefinition : operationDefinitions)
+      {
+         if (operationDefinition.getName().equals(operationName))
+            return operationDefinition;
+      }
+      return null;
+   }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java (from rev 100346, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.rhq.core.domain.configuration.PropertySimple;
+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 javax.management.MBeanInfo;
+import javax.management.MBeanServer;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created Jan 27, 2010
+ */
+public class HornetQDiscoveryComponent implements ResourceDiscoveryComponent
+{
+   public Set<DiscoveredResourceDetails> discoverResources(final ResourceDiscoveryContext ctx) throws InvalidPluginConfigurationException, Exception
+   {
+
+      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+      PropertySimple objectNameProperty = ctx.getDefaultPluginConfiguration().getSimpleProperties().get("objectName");
+      if (objectNameProperty == null)
+      {
+         throw new InvalidPluginConfigurationException("objectName should be configured on service " + ctx.getResourceType());
+      }
+      String mBeanName = objectNameProperty.getStringValue();
+      PropertySimple useResourceKeyForNameProperty = ctx.getDefaultPluginConfiguration().getSimpleProperties().get("useResourceKeyForName");
+      Boolean useResourceKeyForName = useResourceKeyForNameProperty == null ? false : useResourceKeyForNameProperty.getBooleanValue();
+      if (useResourceKeyForName)
+      {
+         ObjectName name = new ObjectName(mBeanName + ",name=*");
+         MBeanServer beanServer = org.jboss.mx.util.MBeanServerLocator.locate();
+         Set<ObjectInstance> objectInstances = beanServer.queryMBeans(name, null);
+         for (ObjectInstance instance : objectInstances)
+         {
+            instance.getObjectName().getCanonicalName();
+            String resourceName = instance.getObjectName().getKeyProperty("name");
+            DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
+                  ctx.getResourceType(), // Resource type
+                  ctx.getResourceType().getName() + ":" + resourceName, // Resource key
+                  resourceName, // Resource name
+                  null, // Resource version
+                  ctx.getResourceType().getDescription(), // Description
+                  ctx.getDefaultPluginConfiguration(), // Plugin config
+                  null // Process info from a process scan
+            );
+            set.add(detail);
+         }
+      }
+      else
+      {
+         DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
+                  ctx.getResourceType(), // Resource type
+                  ctx.getResourceType().getName(), // Resource key
+                  ctx.getResourceType().getName(), // Resource name
+                  null, // Resource version
+                  ctx.getResourceType().getDescription(), // Description
+                  ctx.getDefaultPluginConfiguration(), // Plugin config
+                  null // Process info from a process scan
+            );
+         set.add(detail);
+      }
+      return set;
+
+   }
+}

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -1,133 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *    http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.  See the License for the specific language governing
- * permissions and limitations under the License.
- */
-package org.jboss.as.integration.hornetq.jopr;
-
-import org.jboss.as.integration.hornetq.jopr.util.MBeanUtil;
-import org.jboss.util.property.PropertyMap;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.Property;
-import org.rhq.core.domain.configuration.PropertyList;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.resource.ResourceType;
-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 javax.management.ObjectName;
-import java.util.*;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- *         Created Jan 27, 2010
- */
-public class HornetQJMSQueueComponent implements ResourceComponent, MeasurementFacet, OperationFacet
-{
-   private MBeanUtil util;
-
-   private ObjectName objectName;
-
-   private ResourceContext resourceContext;
-
-   public void getValues(MeasurementReport measurementReport, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
-   {
-
-   }
-
-   public OperationResult invokeOperation(String oper, Configuration configuration) throws InterruptedException, Exception
-   {
-      Collection<PropertySimple> props = configuration.getSimpleProperties().values();
-      Object o = util.invoke(objectName, oper, props);
-      if(o == null)
-      {
-         return null;
-      }
-      else
-      {
-         OperationResult operationResult = new OperationResult();
-         Configuration c = operationResult.getComplexResults();
-         OperationDefinition operationDefinition = getOperationDefinition(oper);
-         PropertyList property = new PropertyList("result");
-         Map[] map = (Map[]) o;
-         for (Map map1 : map)
-         {
-            org.rhq.core.domain.configuration.PropertyMap p1 = new org.rhq.core.domain.configuration.PropertyMap("element");
-            property.add(p1);
-            for (Object o1 : map1.keySet())
-            {
-               p1.put(new PropertySimple((String) o1, map1.get(o1)));
-            }
-         }
-         c.put(property);
-         return operationResult;
-      }
-   }
-
-   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
-   {
-      util = new MBeanUtil();
-      objectName = new ObjectName("org.hornetq:module=JMS,type=Queue,name=" + resourceContext.getResourceKey().split(":")[1]);
-      this.resourceContext = resourceContext;
-   }
-
-   public void stop()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public AvailabilityType getAvailability()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   private OperationDefinition getOperationDefinition(String operationName) {
-        ResourceType resourceType = resourceContext.getResourceType();
-        OperationDefinition operationDefinition = getOperationDefinition(resourceType, operationName);
-        if (operationDefinition == null)
-            throw new IllegalStateException("Operation named '" + operationName
-                + "' is not defined for Resource type '" + resourceType.getName() + "' in the '"
-                + resourceType.getPlugin() + "' plugin's descriptor.");
-        return operationDefinition;
-    }
-
-   public static Configuration getDefaultPluginConfiguration(ResourceType resourceType)
-    {
-        ConfigurationDefinition pluginConfigurationDefinition = resourceType.getPluginConfigurationDefinition();
-        if (pluginConfigurationDefinition != null)
-        {
-            ConfigurationTemplate template = pluginConfigurationDefinition.getDefaultTemplate();
-            if (template != null)
-                return template.getConfiguration().deepCopy();
-        }
-        return new Configuration(); // there is no default plugin config defined - return an empty one
-    }
-
-   public static OperationDefinition getOperationDefinition(ResourceType resourceType, String operationName)
-    {
-        Set<OperationDefinition> operationDefinitions = resourceType.getOperationDefinitions();
-        for (OperationDefinition operationDefinition : operationDefinitions)
-        {
-            if (operationDefinition.getName().equals(operationName))
-                return operationDefinition;
-        }
-        return null;
-    }
-}

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -1,55 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *    http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.  See the License for the specific language governing
- * permissions and limitations under the License.
- */
-package org.jboss.as.integration.hornetq.jopr;
-
-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 javax.management.MBeanInfo;
-import javax.management.MBeanServer;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- *         Created Jan 27, 2010
- */
-public class HornetQJMSQueueDiscoveryComponent implements ResourceDiscoveryComponent<HornetQJMSQueueComponent>
-{
-   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<HornetQJMSQueueComponent> ctx) throws InvalidPluginConfigurationException, Exception
-   {
-      ObjectName name = new ObjectName("org.hornetq:module=JMS,type=Queue,name=*");
-      MBeanServer beanServer = org.jboss.mx.util.MBeanServerLocator.locate();
-      Set<ObjectInstance> objectInstances = beanServer.queryMBeans(name, null);
-      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-      for (ObjectInstance instance : objectInstances)
-      {
-         instance.getObjectName().getCanonicalName();
-         DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
-               ctx.getResourceType(), // Resource type
-               "HornetQJMSQueue:" + instance.getObjectName().getKeyProperty("name"), // Resource key
-               instance.getObjectName().getKeyProperty("name"), // Resource name
-               null, // Resource version
-               "HornetQ JMS Queue", // Description
-               ctx.getDefaultPluginConfiguration(), // Plugin config
-               null // Process info from a process scan
-         );
-         set.add(detail);
-      }
-      return set;
-   }
-}

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -1,75 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *    http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.  See the License for the specific language governing
- * permissions and limitations under the License.
- */
-package org.jboss.as.integration.hornetq.jopr;
-
-import org.jboss.as.integration.hornetq.jopr.util.MBeanUtil;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.Property;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.inventory.*;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-import javax.management.ObjectName;
-import java.util.Collection;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- *         Created Jan 26, 2010
- */
-public class HornetQJMSServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet
-{
-   private MBeanUtil util;
-
-   private ObjectName objectName;
-
-   public void getValues(MeasurementReport measurementReport, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public OperationResult invokeOperation(String oper, Configuration configuration) throws InterruptedException, Exception
-   {
-      Collection<PropertySimple> props = configuration.getSimpleProperties().values();
-      Object o = util.invoke(objectName, oper, props);
-      if(o == null)
-      {
-         return null;  //To change body of implemented methods use File | Settings | File Templates.
-      }
-      else
-      {
-         return new OperationResult(o.toString());
-      }
-   }
-
-   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
-   {
-      util = new MBeanUtil();
-      objectName = new ObjectName("org.hornetq:module=JMS,type=Server");
-   }
-
-   public void stop()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public AvailabilityType getAvailability()
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-}

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *    http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.  See the License for the specific language governing
- * permissions and limitations under the License.
- */
-package org.jboss.as.integration.hornetq.jopr;
-
-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 java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- *         Created Jan 26, 2010
- */
-public class HornetQJMSServerDiscoveryComponent implements ResourceDiscoveryComponent<HornetQJMSServerComponent>
-{
-   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<HornetQJMSServerComponent> ctx) throws InvalidPluginConfigurationException, Exception
-   {
-      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-      DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
-               ctx.getResourceType(), // Resource type
-               "HornetQJMSServerManager", // Resource key
-               "HornetQ JMS Server Manager", // Resource name
-               null, // Resource version
-               "HornetQ Local Server", // Description
-               ctx.getDefaultPluginConfiguration(), // Plugin config
-               null // Process info from a process scan
-         );
-      set.add(detail);
-      return set;
-   }
-}

Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -33,7 +33,7 @@
 
    private ResourceContext resourceContext;
 
-   public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
+   public void getValues(final MeasurementReport report, final Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
    {
       for (MeasurementScheduleRequest request : measurementScheduleRequests)
       {
@@ -47,7 +47,7 @@
       }
    }
 
-   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
+   public void start(final ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
    {
       this.resourceContext = resourceContext;
    }
@@ -62,12 +62,12 @@
      return AvailabilityType.UP;
    }
    
-   public OperationResult invokeOperation(String s, Configuration configuration) throws InterruptedException, Exception
+   public OperationResult invokeOperation(final String s, final Configuration configuration) throws InterruptedException, Exception
    {
       return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
 
-   public void setQueueNames(String[] queueNames)
+   public void setQueueNames(final String[] queueNames)
    {
       this.queueNames = queueNames;
    }

Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -34,7 +34,7 @@
  */
 public class HornetQServerDiscoveryComponent implements ResourceDiscoveryComponent<HornetQServerComponent>
 {
-   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<HornetQServerComponent> ctx) throws InvalidPluginConfigurationException, Exception
+   public Set<DiscoveredResourceDetails> discoverResources(final ResourceDiscoveryContext<HornetQServerComponent> ctx) throws InvalidPluginConfigurationException, Exception
    {
       ObjectName name = new ObjectName("org.hornetq:module=JMS,type=Server");
       MBeanServer beanServer = org.jboss.mx.util.MBeanServerLocator.locate();

Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/MBeanUtil.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/MBeanUtil.java	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/MBeanUtil.java	2010-02-03 15:24:39 UTC (rev 100348)
@@ -31,15 +31,13 @@
 
    private MBeanServer beanServer;
 
-   private ObjectName jmsServerManager;
-
    private void init() throws Exception
    {
       beanServer = MBeanServerLocator.locate();
-      jmsServerManager = new ObjectName("org.hornetq:module=JMS,type=Server");
+      initialized = true;
    }
 
-   public Object invoke(ObjectName objectName, String oper, Collection<PropertySimple> props) throws Exception
+   public Object invoke(final ObjectName objectName, final String oper, final Collection<PropertySimple> props) throws Exception
    {
       if(!initialized)
       {
@@ -51,8 +49,16 @@
       return beanServer.invoke(objectName, oper, params, signature);
    }
 
-   private static void populateParams(Collection<PropertySimple> props, Object[] params, String[] signature)
+   public Object getAttribute(final ObjectName objectName, final String attr) throws Exception
    {
+      if(!initialized)
+      {
+         init();
+      }
+      return beanServer.getAttribute(objectName, attr);
+   }
+   private static void populateParams(final Collection<PropertySimple> props, final Object[] params, final String[] signature)
+   {
       int pos = 0;
       for (PropertySimple prop : props)
       {

Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-02-03 15:11:52 UTC (rev 100347)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-02-03 15:24:39 UTC (rev 100348)
@@ -24,16 +24,19 @@
                  description="the HornetQ Version"
                  dataType="trait" displayType="summary"/>
          <service name="HornetQ JMS Server"
-            discovery="HornetQJMSServerDiscoveryComponent"
+            discovery="HornetQDiscoveryComponent"
             subCategory="JMS"
-            class="HornetQJMSServerComponent"
+            class="HornetQComponent"
             singleton="true">
+            <plugin-configuration>
+                <c:simple-property name="objectName" default="org.hornetq:module=JMS,type=Server"/>
+            </plugin-configuration>
             <operation name="createQueue" displayName="Create a JMS Queue" description="Create a JMS Queue.">
                <parameters>
 		            <c:simple-property required="true" name="queueName" displayName="queue name"/>
                   <c:simple-property required="true" name="String:jndiBinding" displayName="jndi binding"/>
 		        </parameters>
-               <results><c:simple-property name="operationResult" description="The Outcome of creating the queue."/></results>
+               <results><c:simple-property name="operationResult" type="boolean" description="The Outcome of creating the queue."/></results>
             </operation>
             <operation name="destroyQueue" displayName="Destroy a JMS Queue" description="Destroy a JMS Queue.">
                <parameters>
@@ -54,15 +57,87 @@
 		        </parameters>
                <results><c:simple-property name="operationResult" description="The Outcome of destroying the topic."/></results>
             </operation>
+            <operation name="createConnectionFactory" displayName="Create a JMS ConnectionFactory" description="Create a JMS ConnectionFactory.">
+               <parameters>
+		            <c:simple-property required="true" name="name" displayName="connection factory name name"/>
+		            <c:simple-property required="true" name="liveTransportClassName" displayName="the transport class"/>
+		            <c:simple-property required="true" name="liveTransportParams" displayName="comma-separated list of key=value for the transport parameters"/>
+		            <c:simple-property required="true" name="jndiBindings" displayName="comma-separated list of JNDI bindings"/>
+		        </parameters>
+            </operation>
+            <operation name="listRemoteAddresses,result=String[]" displayName="List Remote Addresses" description="List all remote addresses connected to HornetQ.">
+               <results>
+	                <c:list-property name="result">
+                      <c:simple-property name="element"/>
+	                </c:list-property>
+               </results>
+            </operation>
+            <operation name="listRemoteAddresses2,operation=listRemoteAddresses,result=String[]" displayName="List Remote Addresses" description="List all remote addresses connected to HornetQ that match an ip address.">
+               <parameters>
+		            <c:simple-property required="true" name="ipAddress" displayName="The IP Address"/>
+		         </parameters>
+               <results>
+	                <c:list-property name="result">
+                      <c:simple-property name="element"/>
+	                </c:list-property>
+               </results>
+            </operation>
+            <operation name="closeConnectionsForAddress" displayName="Close Connection" description="Closes all the connections for the given IP Address.">
+               <parameters>
+		            <c:simple-property required="true" name="ipAddress" displayName="The IP Address"/>
+		         </parameters>
+               <results><c:simple-property name="operationResult" type="boolean" description="The Outcome of closing the connection."/></results>
+            </operation>
+            <operation name="listConnectionIDs,result=String[]" displayName="List connections" description="List all the connection IDs.">
+               <results>
+	                <c:list-property name="result">
+                      <c:simple-property name="element"/>
+	                </c:list-property>
+               </results>
+            </operation>
+            <operation name="listSessions,result=String[]" displayName="List sessions" description="List the sessions for the given connectionID.">
+               <parameters>
+		            <c:simple-property required="true" name="connectionID" displayName="The Connection ID"/>
+		         </parameters>
+               <results>
+	                <c:list-property name="result">
+                      <c:simple-property name="element"/>
+	                </c:list-property>
+               </results>
+            </operation>
+            <metric property="Started"
+                 displayName="HornetQ Started"
+                 description="Is the JMSServer Started"
+                 dataType="trait" displayType="summary"/>
+            <metric property="Version"
+                 displayName="HornetQ Version"
+                 description="The Version of the HornetQ JMS Server"
+                 dataType="trait" displayType="summary"/>
+            <metric property="TopicNames"
+                 displayName="Topics"
+                 description="The available topics"
+                 dataType="trait" displayType="summary"/>
+            <metric property="QueueNames"
+                 displayName="Queues"
+                 description="The available queues"
+                 dataType="trait" displayType="summary"/>
+            <metric property="ConnectionFactoryNames"
+                 displayName="Connection Factories"
+                 description="The available connection factories"
+                 dataType="trait" displayType="summary"/>
          </service>
 
          <service name="Queues"
-                  discovery="HornetQJMSQueueDiscoveryComponent"
+                  discovery="HornetQDiscoveryComponent"
                   subCategory="JMS"
-                  class="HornetQJMSQueueComponent">
-            <operation name="listMessages" displayName="list all the messages" description="list all the messages.">
+                  class="HornetQComponent">
+            <plugin-configuration>
+                <c:simple-property name="objectName" default="org.hornetq:module=JMS,type=Queue"/>
+                <c:simple-property name="useResourceKeyForName" type="boolean" default="true"/>
+            </plugin-configuration>
+            <operation name="listMessages,result=JMSMessage" displayName="list all the messages" description="list all the messages.">
                <parameters>
-		            <c:simple-property required="false" name="selector" displayName="the selector"/>
+		            <c:simple-property required="false" name="filter" displayName="A JMS message filter (can be empty)"/>
 		        </parameters>
                <results>
 	                <c:list-property name="result">
@@ -76,7 +151,162 @@
 	                </c:list-property>
                </results>
             </operation>
+            <operation name="countMessages" displayName="list all the messages" description="Returns the number of the messages in the queue matching the given filter.">
+               <parameters>
+		            <c:simple-property required="false" name="selector" displayName="the selector"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="integer" description="Number of the messages in the queue matching the given filter."/>
+               </results>
+            </operation>
+            <operation name="removeMessage" displayName="remove message" description="Remove the message corresponding to the given messageID.">
+               <parameters>
+		            <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="boolean" description="Was the message removed."/>
+               </results>
+            </operation>
+            <operation name="removeMessages" displayName="remove messages" description="Remove the messages corresponding to the given filter.">
+               <parameters>
+		            <c:simple-property required="false" name="filter" displayName="A message filter"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="integer" description="Number of removed messages."/>
+               </results>
+            </operation>
+            <operation name="expireMessages" displayName="expire messages" description="Expires the messages corresponding to the given filter.">
+               <parameters>
+		            <c:simple-property required="false" name="filter" displayName="A message filter"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="integer" description="Number of expired messages."/>
+               </results>
+            </operation>
+            <operation name="expireMessage" displayName="expire message" description="Expire the message corresponding to the given messageID.">
+               <parameters>
+		            <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="boolean" description="Was the message removed."/>
+               </results>
+            </operation>
+            <operation name="sendMessageToDeadLetterAddress" displayName="send message to dead letter address" description="Send the message corresponding to the given messageID to this queue's Dead Letter Address.">
+               <parameters>
+		            <c:simple-property required="true" name="messageID" displayName="The message ID"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="boolean" description="Was the message sent."/>
+               </results>
+            </operation>
+            <operation name="sendMessagesToDeadLetterAddress" displayName="send messages to dead letter address" description="Send the messages corresponding to the given filter to this queue's Dead Letter Address.">
+               <parameters>
+		            <c:simple-property required="false" name="filterStr" displayName="A message filter"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="integer" description="Number of expired messages."/>
+               </results>
+            </operation>
+            <operation name="changeMessagePriority" displayName="change message priority" description="Change the priority of the message corresponding to the given messageID.">
+               <parameters>
+		            <c:simple-property required="true" name="messageID" displayName="A message ID"/>
+                  <c:simple-property required="true" name="newPriority" displayName="the new priority (between 0 and 9)"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="boolean" description="True if priority set."/>
+               </results>
+            </operation>
+            <operation name="changeMessagesPriority" displayName="change messages priority" description="Change the priority of the messages corresponding to the given filter.">
+               <parameters>
+		            <c:simple-property required="false" name="filter" displayName="A message filter"/>
+                  <c:simple-property required="true" name="newPriority" displayName="the new priority (between 0 and 9)"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="integer" description="Number of messages reset with priority."/>
+               </results>
+            </operation>
+            <operation name="moveMessage" displayName="move message" description="Move the message corresponding to the given messageID to another queue.">
+               <parameters>
+		            <c:simple-property required="true" name="messageID" displayName="A message ID"/>
+                  <c:simple-property required="true" name="otherQueueName" displayName="The name of the queue to move the message to"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="boolean" description="True if message moved."/>
+               </results>
+            </operation>
+            <operation name="moveMessages" displayName="move messages" description="Move the messages corresponding to the given filter.">
+               <parameters>
+		            <c:simple-property required="true" name="messageID" displayName="A message ID"/>
+                  <c:simple-property required="true" name="otherQueueName" displayName="The name of the queue to move the message to"/>
+		        </parameters>
+               <results>
+	                <c:simple-property name="operationResult" type="boolean" description="True if message moved."/>
+               </results>
+            </operation>
+            <operation name="listMessageCounter" displayName="list message counter" description="List the message counters.">
+               <results>
+	                <c:simple-property name="operationResult"  description="Message Counters."/>
+               </results>
+            </operation>
+            <operation name="resetMessageCounter" displayName="reset message counters" description="Reset the message counters.">
+            </operation>
+            <operation name="listMessageCounterAsHTML" displayName="list message counter in HTML" description="List the message counters in HTML.">
+               <results>
+	                <c:simple-property name="operationResult"  description="Message Counters."/>
+               </results>
+            </operation>
+            <operation name="listMessageCounterHistory" displayName="list message counter history" description="List the message counters history.">
+               <results>
+	                <c:simple-property name="operationResult"  description="Message Counter history."/>
+               </results>
+            </operation>
+            <operation name="listMessageCounterHistoryAsHTML" displayName="list message counter history in HTML" description="List the message counters history in HTML.">
+               <results>
+	                <c:simple-property name="operationResult"  description="Message Counter history."/>
+               </results>
+            </operation>
+            <operation name="pause" displayName="pause the queue" description="Pause the queue.">
+            </operation>
+            <operation name="resume" displayName="resume the queue" description="Resume the queue.">
+            </operation>
+            <metric property="ScheduledCount"
+                 displayName="Scheduled Count"
+                 description="number of scheduled messages in this queue"
+                 dataType="trait" displayType="summary"/>
+            <metric property="ConsumerCount"
+                 displayName="Consumer Count"
+                 description="number of consumers consuming messages from this queue"
+                 dataType="trait" displayType="summary"/>
+            <metric property="DeliveringCount"
+                 displayName="Delivering Count"
+                 description="number of messages that this queue is currently delivering to its consumers"
+                 dataType="trait" displayType="summary"/>
+            <metric property="MessagesAdded"
+                 displayName="Messages Added"
+                 description="number of messages added to this queue since it was created"
+                 dataType="trait" displayType="summary"/>
+            <metric property="ExpiryAddress"
+                 displayName="Expiry Address"
+                 description="expiry address associated to this queue"
+                 dataType="trait" displayType="summary"/>
+            <metric property="DeadLetterAddress"
+                 displayName="Dead Letter Address"
+                 description="the dead-letter address associated to this queue"
+                 dataType="trait" displayType="summary"/>
+            <metric property="Paused"
+                 displayName="paused"
+                 description="Is the queue currently paused"
+                 dataType="trait" displayType="summary"/>
          </service>
+         <service name="Topics"
+                  discovery="HornetQDiscoveryComponent"
+                  subCategory="JMS"
+                  class="HornetQComponent">
+            <plugin-configuration>
+                <c:simple-property name="objectName" default="org.hornetq:module=JMS,type=Topic"/>
+                <c:simple-property name="useResourceKeyForName" type="boolean" default="true"/>
+            </plugin-configuration>
+         </service>
       </server>
 
 </plugin>




More information about the jboss-cvs-commits mailing list