[jboss-cvs] JBossAS SVN: r100305 - in branches/Branch_Hornet_Temporary_2: hornetq-int/src/main/java/org/jboss and 10 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 2 17:04:47 EST 2010


Author: clebert.suconic at jboss.com
Date: 2010-02-02 17:04:46 -0500 (Tue, 02 Feb 2010)
New Revision: 100305

Added:
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployer/
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/
   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
   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/
Removed:
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueDiscoveryComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerDiscoveryComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerDiscoveryComponent.java
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/util/
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/server/integration/
Modified:
   branches/Branch_Hornet_Temporary_2/hornetq-int/pom.xml
   branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployer/DestinationFactoryDeployerPlugin.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
   branches/Branch_Hornet_Temporary_2/server/src/etc/deployers/ejb-deployer-jboss-beans.xml
Log:
renaming packages

Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/pom.xml
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/pom.xml	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/pom.xml	2010-02-02 22:04:46 UTC (rev 100305)
@@ -28,7 +28,7 @@
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <excludes>
-             <exclude>org/jboss/jms/jopr/**</exclude>
+             <exclude>org/jboss/as/integration/hornetq/jopr/**</exclude>
              <exclude>**/rhq-plugin.xml</exclude>
           </excludes>
         </configuration>
@@ -54,7 +54,7 @@
                 </copy>
                 <jar jarfile="target/jboss-as-hornetq-plugin.jar">
                   <fileset dir="${project.build.outputDirectory}">
-                    <include name="org/jboss/jms/jopr/**"/>
+                    <include name="org/jboss/as/integration/hornetq/jopr/**"/>
                   </fileset>
                    <fileset dir="target/resources">
                     <include name="META-INF/**"/>

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployer (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/server/integration)

Modified: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployer/DestinationFactoryDeployerPlugin.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/server/integration/DestinationFactoryDeployerPlugin.java	2010-02-01 14:16:40 UTC (rev 100211)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/deployer/DestinationFactoryDeployerPlugin.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -1,4 +1,4 @@
-package org.jboss.jms.server.integration;
+package org.jboss.as.integration.hornetq.deployer;
 
 import javax.jms.Queue;
 import javax.jms.Topic;

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -0,0 +1,133 @@
+/*
+ * 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;
+    }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueDiscoveryComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSQueueDiscoveryComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -0,0 +1,55 @@
+/*
+ * 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;
+   }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -0,0 +1,75 @@
+/*
+ * 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.
+   }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerDiscoveryComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMSServerDiscoveryComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -0,0 +1,44 @@
+/*
+ * 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;
+   }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -0,0 +1,74 @@
+/*
+ * 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.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.Set;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created Jan 26, 2010
+ */
+public class HornetQServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet
+{
+   private String[] queueNames;
+
+   private ResourceContext resourceContext;
+
+   public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
+   {
+      for (MeasurementScheduleRequest request : measurementScheduleRequests)
+      {
+         if(DataType.TRAIT.equals(request.getDataType()))
+         {
+            if(request.getName().equals("hornetqversion"))
+            {
+               report.addData(new MeasurementDataTrait(request, resourceContext.getVersion()));
+            }
+         }
+      }
+   }
+
+   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
+   {
+      this.resourceContext = resourceContext;
+   }
+
+   public void stop()
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public AvailabilityType getAvailability()
+   {
+     return AvailabilityType.UP;
+   }
+   
+   public OperationResult invokeOperation(String s, Configuration configuration) throws InterruptedException, Exception
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void setQueueNames(String[] queueNames)
+   {
+      this.queueNames = queueNames;
+   }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerDiscoveryComponent.java)
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java	                        (rev 0)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -0,0 +1,60 @@
+/*
+ * 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.deployers.spi.management.ManagementView;
+import org.jboss.profileservice.spi.ProfileService;
+import org.rhq.core.domain.configuration.Configuration;
+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.MBeanAttributeInfo;
+import javax.management.MBeanInfo;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+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 HornetQServerDiscoveryComponent implements ResourceDiscoveryComponent<HornetQServerComponent>
+{
+   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<HornetQServerComponent> ctx) throws InvalidPluginConfigurationException, Exception
+   {
+      ObjectName name = new ObjectName("org.hornetq:module=JMS,type=Server");
+      MBeanServer beanServer = org.jboss.mx.util.MBeanServerLocator.locate();
+      MBeanInfo info = beanServer.getMBeanInfo(name);
+      String version = (String) beanServer.getAttribute(name, "Version");
+      String[] queueNames = (String[]) beanServer.getAttribute(name, "QueueNames");
+      MBeanAttributeInfo[] attributeInfos = info.getAttributes();
+      //ctx.getParentResourceComponent().setQueueNames(queueNames);
+      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+      Configuration c = new Configuration();
+      DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
+               ctx.getResourceType(), // Resource type
+               "HornetQServer", // Resource key
+               "HornetQ Local Server", // Resource name
+               version, // Resource version
+               "HornetQ Local Server", // Description
+               c, // Plugin config
+               null // Process info from a process scan
+         );
+      set.add(detail);
+      return set;
+   }
+}

Copied: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util (from rev 100211, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/util)

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/jms/jopr/util/MBeanUtil.java	2010-02-01 14:16:40 UTC (rev 100211)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/MBeanUtil.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -10,7 +10,7 @@
  * implied.  See the License for the specific language governing
  * permissions and limitations under the License.
  */
-package org.jboss.jms.jopr.util;
+package org.jboss.as.integration.hornetq.jopr.util;
 
 import org.jboss.mx.util.MBeanServerLocator;
 import org.rhq.core.domain.configuration.Property;

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueComponent.java	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -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.jms.jopr;
-
-import org.jboss.jms.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/jms/jopr/HornetQJMSQueueDiscoveryComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueDiscoveryComponent.java	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSQueueDiscoveryComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -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.jms.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/jms/jopr/HornetQJMSServerComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerComponent.java	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -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.jms.jopr;
-
-import org.jboss.jms.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/jms/jopr/HornetQJMSServerDiscoveryComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerDiscoveryComponent.java	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQJMSServerDiscoveryComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -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.jms.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;
-   }
-}

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerComponent.java	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -1,74 +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.jms.jopr;
-
-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.Set;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- *         Created Jan 26, 2010
- */
-public class HornetQServerComponent implements ResourceComponent, MeasurementFacet, OperationFacet
-{
-   private String[] queueNames;
-
-   private ResourceContext resourceContext;
-
-   public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
-   {
-      for (MeasurementScheduleRequest request : measurementScheduleRequests)
-      {
-         if(DataType.TRAIT.equals(request.getDataType()))
-         {
-            if(request.getName().equals("hornetqversion"))
-            {
-               report.addData(new MeasurementDataTrait(request, resourceContext.getVersion()));
-            }
-         }
-      }
-   }
-
-   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
-   {
-      this.resourceContext = resourceContext;
-   }
-
-   public void stop()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public AvailabilityType getAvailability()
-   {
-     return AvailabilityType.UP;
-   }
-   
-   public OperationResult invokeOperation(String s, Configuration configuration) throws InterruptedException, Exception
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void setQueueNames(String[] queueNames)
-   {
-      this.queueNames = queueNames;
-   }
-}

Deleted: branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerDiscoveryComponent.java
===================================================================
--- branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerDiscoveryComponent.java	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/jms/jopr/HornetQServerDiscoveryComponent.java	2010-02-02 22:04:46 UTC (rev 100305)
@@ -1,60 +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.jms.jopr;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.profileservice.spi.ProfileService;
-import org.rhq.core.domain.configuration.Configuration;
-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.MBeanAttributeInfo;
-import javax.management.MBeanInfo;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-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 HornetQServerDiscoveryComponent implements ResourceDiscoveryComponent<HornetQServerComponent>
-{
-   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<HornetQServerComponent> ctx) throws InvalidPluginConfigurationException, Exception
-   {
-      ObjectName name = new ObjectName("org.hornetq:module=JMS,type=Server");
-      MBeanServer beanServer = org.jboss.mx.util.MBeanServerLocator.locate();
-      MBeanInfo info = beanServer.getMBeanInfo(name);
-      String version = (String) beanServer.getAttribute(name, "Version");
-      String[] queueNames = (String[]) beanServer.getAttribute(name, "QueueNames");
-      MBeanAttributeInfo[] attributeInfos = info.getAttributes();
-      //ctx.getParentResourceComponent().setQueueNames(queueNames);
-      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-      Configuration c = new Configuration();
-      DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
-               ctx.getResourceType(), // Resource type
-               "HornetQServer", // Resource key
-               "HornetQ Local Server", // Resource name
-               version, // Resource version
-               "HornetQ Local Server", // Description
-               c, // Plugin config
-               null // Process info from a process scan
-         );
-      set.add(detail);
-      return set;
-   }
-}

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-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-02-02 22:04:46 UTC (rev 100305)
@@ -2,7 +2,7 @@
 <plugin name="HornetQ"
         displayName="HornetQPlugin"
         description="Supports management and monitoring of HornetQ Servers"
-        package="org.jboss.jms.jopr"
+        package="org.jboss.as.integration.hornetq.jopr"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="urn:xmlns:rhq-plugin"
         xmlns:c="urn:xmlns:rhq-configuration">
@@ -79,4 +79,4 @@
          </service>
       </server>
 
-</plugin>
\ No newline at end of file
+</plugin>

Modified: branches/Branch_Hornet_Temporary_2/server/src/etc/deployers/ejb-deployer-jboss-beans.xml
===================================================================
--- branches/Branch_Hornet_Temporary_2/server/src/etc/deployers/ejb-deployer-jboss-beans.xml	2010-02-02 22:03:56 UTC (rev 100304)
+++ branches/Branch_Hornet_Temporary_2/server/src/etc/deployers/ejb-deployer-jboss-beans.xml	2010-02-02 22:04:46 UTC (rev 100305)
@@ -108,9 +108,9 @@
             <property name="rarName">hornetq-ra.rar</property>
          </bean>
       </property>
-      <!-- Create a destination with JBoss Messaging -->
+      <!-- Create a destination with HornetQ -->
       <property name="factory">
-         <bean class="org.jboss.jms.server.integration.DestinationFactoryDeployerPlugin">
+         <bean class="org.jboss.as.integration.hornetq.deployer.DestinationFactoryDeployerPlugin">
             <property name="jmsManager"><inject bean="JMSServerManager"/></property>
          </bean>
       </property>




More information about the jboss-cvs-commits mailing list