[jboss-cvs] JBossAS SVN: r102635 - in trunk/hornetq-int/src: main/java/org/jboss/as/integration/hornetq/jopr/util and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Mar 19 15:13:20 EDT 2010


Author: ataylor
Date: 2010-03-19 15:13:19 -0400 (Fri, 19 Mar 2010)
New Revision: 102635

Added:
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSDestinationComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerDiscoveryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent2.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/JMSDestinationManageMO.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/SubscriptionInfoMapper.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java
Removed:
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerDiscoveryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnection.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnectionProvider.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BasicProfileServiceConnection.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/LocalProfileServiceConnectionProvider.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnection.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnectionProvider.java
Modified:
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponentConstants.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMXDiscoveryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueComponent2.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent2.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BeanNotAvailableException.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/EMSHelper.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Invoker.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/JMXInvoker.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ManagementSupport.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Operation.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageImplMO.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java
   trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml
   trunk/hornetq-int/src/resources/hornetq-deployers-jboss-beans.xml
Log:
updates to hornetq integration management objects and jopr plugin

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,24 +1,38 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
-import org.jboss.as.integration.hornetq.jopr.util.*;
+import org.jboss.as.integration.hornetq.jopr.util.Invoker;
+import org.jboss.as.integration.hornetq.jopr.util.Operation;
+import org.jboss.as.integration.hornetq.jopr.util.ResultsFormatter;
 import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
 import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
 import org.rhq.core.domain.configuration.definition.PropertyDefinition;
-import org.rhq.core.domain.measurement.*;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.DataType;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
 import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
 import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
@@ -27,7 +41,6 @@
 import org.rhq.core.pluginapi.measurement.MeasurementFacet;
 import org.rhq.core.pluginapi.operation.OperationFacet;
 import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.core.util.exception.ThrowableUtil;
 
 import java.util.Collection;
 import java.util.List;

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponentConstants.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponentConstants.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQComponentConstants.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
 /**

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQDiscoveryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,26 +1,33 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
-import org.jboss.as.integration.hornetq.jopr.util.EMSHelper;
 import org.jboss.as.integration.hornetq.jopr.util.Invoker;
-import org.jboss.as.integration.hornetq.jopr.util.JMXInvoker;
-import org.mc4j.ems.connection.EmsConnection;
 import org.mc4j.ems.connection.bean.EmsBean;
-import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.inventory.*;
-import org.rhq.plugins.jmx.JMXDiscoveryComponent;
+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.List;

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMXDiscoveryComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMXDiscoveryComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQJMXDiscoveryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
 /**

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
 import org.jboss.as.integration.hornetq.jopr.util.EMSHelper;
@@ -20,6 +29,7 @@
 import org.rhq.core.pluginapi.inventory.ResourceComponent;
 import org.rhq.core.pluginapi.inventory.ResourceContext;
 import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+
 import java.util.Set;
 
 /**

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/HornetQServerDiscoveryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
 import org.jboss.as.integration.hornetq.jopr.util.BeanNotAvailableException;
@@ -19,12 +28,13 @@
 import org.mc4j.ems.connection.EmsConnection;
 import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.inventory.*;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
 import org.rhq.plugins.jmx.JMXDiscoveryComponent;
 
 import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 
 /**

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.jboss.deployers.spi.management.ManagementView;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
+ */
+public interface JMSComponent
+{
+   ManagementView getProfileService() throws Exception;
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -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.jboss.managed.api.ComponentType;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created Mar 19, 2010
+ */
+public class JMSConnectionFactoryComponent extends JMSDestinationComponent
+{
+   private static ComponentType componentType = new ComponentType("JMSManage", "ConnectionFactoryManage");
+
+   private static String componentName = "JMSConnectionFactoryManageMO";
+
+   @Override
+   protected String getInvokeOperationSubscriptionMessage()
+   {
+      return null;
+   }
+
+   @Override
+   protected String getInvokeOperationJMSMessage()
+   {
+      return null;
+   }
+
+   @Override
+   protected String getInvokeOperation()
+   {
+      return "";
+   }
+
+   @Override
+   String getComponentName()
+   {
+      return componentName;
+   }
+
+   @Override
+   ComponentType getComponentType()
+   {
+      return componentType;
+   }
+
+   @Override
+   String getConfigurationOperationName()
+   {
+      return "getConfiguration";
+   }
+
+   @Override
+   String getMeasurementsOperationName()
+   {
+      return "getMeasurements";
+   }
+
+   public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryDiscoveryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,64 @@
+/*
+ * 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.ManagementSupport;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.metatype.api.values.ArrayValueSupport;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.resource.ResourceType;
+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 Mar 19, 2010
+ */
+public class JMSConnectionFactoryDiscoveryComponent implements ResourceDiscoveryComponent
+{
+   private static final ComponentType componentType = new ComponentType("JMSManage", "ConnectionFactoryManage");
+
+   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException, Exception
+   {
+      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+      JMSComponent context = (JMSComponent) resourceDiscoveryContext.getParentResourceComponent();
+      ManagementView managementView = context.getProfileService();
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSConnectionFactoryManageMO", "getJMSConnectionFactories", componentType);
+
+      ArrayValueSupport value = (ArrayValueSupport) operation.invoke();
+
+      for (int i = 0; i < value.getLength(); i++)
+      {
+         Configuration configuration = new Configuration();
+         SimpleValueSupport queue = (SimpleValueSupport) value.getValue(i);
+         ResourceType resourceType = resourceDiscoveryContext.getResourceType();
+         String queueName = queue.getValue().toString();
+         set.add(new DiscoveredResourceDetails(resourceType,
+             queueName,
+             queueName,
+             "a JMS ConnectionFactory",
+             "",
+             configuration,
+             null));
+      }
+      return set;
+   }
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSDestinationComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSDestinationComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSDestinationComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,304 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.jboss.as.integration.hornetq.jopr.util.ManagementSupport;
+import org.jboss.as.integration.hornetq.jopr.util.Operation;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.metatype.api.types.ArrayMetaType;
+import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.*;
+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.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.domain.measurement.*;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+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.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
+ */
+public abstract class JMSDestinationComponent implements ResourceComponent, MeasurementFacet, OperationFacet, ConfigurationFacet, JMSComponent
+{
+   private ResourceContext resourceContext;
+   private JMSComponent jmsComponent;
+
+   public AvailabilityType getAvailability()
+   {
+      return null;
+   }
+
+   public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
+   {
+      ArrayValueSupport support = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
+      SimpleValueSupport[] valueSupports = new SimpleValueSupport[measurementScheduleRequests.size()];
+      Iterator<MeasurementScheduleRequest> it = measurementScheduleRequests.iterator();
+      for (int i = 0, valueSupportsLength = valueSupports.length; i < valueSupportsLength; i++)
+      {
+         valueSupports[i] = new SimpleValueSupport(SimpleMetaType.STRING, it.next().getName());
+      }
+      support.setValue(valueSupports);
+      ManagementView view = getProfileService();
+
+      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), getMeasurementsOperationName(), getComponentType());
+      ArrayValueSupport vals = (ArrayValueSupport) operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()), support);
+      it = measurementScheduleRequests.iterator();
+      for (int i = 0, valueSupportsLength = valueSupports.length; i < valueSupportsLength; i++)
+      {
+         MeasurementScheduleRequest request = it.next();
+         SimpleValueSupport simpleValueSupport = (SimpleValueSupport) vals.getValue(i);
+         simpleValueSupport.getValue();
+         if (request.getDataType().equals(DataType.MEASUREMENT))
+         {
+            report.addData(new MeasurementDataNumeric(request, Double.valueOf(simpleValueSupport.getValue().toString())));
+         }
+         else if (request.getDataType().equals(DataType.TRAIT))
+         {
+            report.addData(new MeasurementDataTrait(request, simpleValueSupport.getValue().toString()));
+         }
+      }
+   }
+
+   public Configuration loadResourceConfiguration() throws Exception
+   {
+      Configuration config = new Configuration();
+      ManagementView view = getProfileService();
+
+      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), getConfigurationOperationName(), getComponentType());
+
+      CompositeValueSupport val = (CompositeValueSupport) operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()));
+
+      ConfigurationDefinition configDef = resourceContext.getResourceType().getResourceConfigurationDefinition();
+      List<PropertyDefinition> propertyDefinitionList = configDef.getPropertiesInGroup("HornetQCustomProperties");
+      for (PropertyDefinition definition : propertyDefinitionList)
+      {
+         String name = definition.getName();
+         if (val.containsKey(name))
+         {
+            SimpleValueSupport attr = (SimpleValueSupport) val.get(name);
+            PropertySimple simple = new PropertySimple(name, attr.getValue());
+            config.put(simple);
+         }
+      }
+      return config;
+   }
+
+   public OperationResult invokeOperation(String s, Configuration configuration) throws InterruptedException, Exception
+   {
+      Operation oper = Operation.getOperation(s);
+      Collection<PropertySimple> props = configuration.getSimpleProperties().values();
+      SimpleValueSupport[] params = new SimpleValueSupport[props.size()];
+      SimpleValueSupport[] signature = new SimpleValueSupport[props.size()];
+      populateParams(props, params, signature);
+      ArrayValueSupport param = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
+      param.setValue(params);
+      ArrayValueSupport sig = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
+      sig.setValue(signature);
+      SimpleValueSupport queueName = new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey());
+      SimpleValueSupport methodName = new SimpleValueSupport(SimpleMetaType.STRING, oper.getOperationName());
+      ManagementView view = getProfileService();
+      String methodOperation = getInvokeOperation();
+      if("JMSMessage".equalsIgnoreCase(oper.getResultsType()))
+      {
+         methodOperation = getInvokeOperationJMSMessage();
+      }
+      else if("SubscriptionInfo".equalsIgnoreCase(oper.getResultsType()))
+      {
+         methodOperation = getInvokeOperationSubscriptionMessage();
+      }
+      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), methodOperation, getComponentType());
+      Object result = null;
+      result = operation.invoke(queueName, methodName, param, sig);
+      if (result == null)
+      {
+         return null;
+      }
+      return formatResults(result, oper.getResultsType());
+   }
+
+   protected abstract String getInvokeOperationSubscriptionMessage();
+
+   protected abstract String getInvokeOperationJMSMessage();
+
+   protected abstract String getInvokeOperation();
+
+   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
+   {
+      this.resourceContext = resourceContext;
+
+      jmsComponent = (JMSComponent) resourceContext.getParentResourceComponent();
+   }
+
+   public void stop()
+   {
+      this.resourceContext = null;
+   }
+
+   abstract String getComponentName();
+
+   abstract ComponentType getComponentType();
+
+   abstract String getConfigurationOperationName();
+
+   abstract String getMeasurementsOperationName();
+
+   private void populateParams(final Collection<PropertySimple> props, final SimpleValueSupport[] params, final SimpleValueSupport[] signature)
+   {
+      int pos = 0;
+      for (PropertySimple prop : props)
+      {
+         String[] val = prop.getName().split(":");
+         if (val.length == 1)
+         {
+            params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getStringValue()));
+            signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "java.lang.String");
+         }
+         else
+         {
+            if (val[0].equals("Boolean"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getBooleanValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "java.lang.Boolean");
+            }
+            else if (val[0].equals("boolean"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getBooleanValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "boolean");
+            }
+            else if (val[0].equals("String"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getStringValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "java.lang.String");
+            }
+            else if (val[0].equals("Long"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getLongValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "java.lang.Long");
+            }
+            else if (val[0].equals("long"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getLongValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "long");
+            }
+            else if (val[0].equals("Integer"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getIntegerValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "java.lang.Integer");
+            }
+            else if (val[0].equals("int"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getIntegerValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "int");
+            }
+            else if (val[0].equals("Double"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getDoubleValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "java.lang.Double");
+            }
+            else if (val[0].equals("double"))
+            {
+               params[pos] = new SimpleValueSupport(SimpleMetaType.STRING, getStringValue(prop.getDoubleValue()));
+               signature[pos] = new SimpleValueSupport(SimpleMetaType.STRING, "double");
+            }
+         }
+         pos++;
+      }
+   }
+
+   private String getStringValue(Object o)
+   {
+      return o == null ? "null" : o.toString();
+   }
+
+
+   private OperationResult formatResults(Object val, String type) throws Exception
+   {
+      if (type == null)
+      {
+         SimpleValueSupport valueSupport = (SimpleValueSupport) val;
+         return new OperationResult(valueSupport.getValue().toString());
+      }
+      else if(type.equalsIgnoreCase("String"))
+      {
+         SimpleValueSupport valueSupport = (SimpleValueSupport) val;
+         return new OperationResult(valueSupport.getValue().toString());
+      }
+      else if(type.equalsIgnoreCase("JMSMessage") || type.equalsIgnoreCase("SubscriptionInfo"))
+      {
+         OperationResult operationResult = new OperationResult();
+         Configuration c = operationResult.getComplexResults();
+         PropertyList property = new PropertyList("result");
+         CollectionValueSupport valueSupport = (CollectionValueSupport) val;
+         MetaValue[] msgs =  valueSupport.getElements();
+         for (MetaValue mv : msgs)
+         {
+            CompositeValueSupport msg = (CompositeValueSupport) mv;
+            org.rhq.core.domain.configuration.PropertyMap p1 = new org.rhq.core.domain.configuration.PropertyMap("element");
+            property.add(p1);
+            ImmutableCompositeMetaType metaType = (ImmutableCompositeMetaType) msg.getMetaType();
+            Set<String> keys = metaType.keySet();
+            for (String key : keys)
+            {
+               SimpleValueSupport sattr = (SimpleValueSupport) msg.get(key);
+               if(sattr != null)
+                  p1.put(new PropertySimple(key,sattr.getValue()));
+            }
+         }
+         c.put(property);
+         return operationResult;
+      }
+      else if (val instanceof CompositeValueSupport)
+      {
+         CompositeValueSupport valueSupport = (CompositeValueSupport) val;
+         if (valueSupport.containsKey("cause"))
+         {
+            CompositeValueSupport cause = (CompositeValueSupport) valueSupport.get("cause");
+            SimpleValueSupport message = (SimpleValueSupport) cause.get("message");
+            Exception exception = new Exception(message.toString());
+            throw exception;
+         }
+         return new OperationResult("not yet");
+      }
+      return new OperationResult("not yet");
+   }
+
+   public ManagementView getProfileService() throws Exception
+   {
+      return jmsComponent.getProfileService();
+   }
+}

Copied: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerComponent.java (from rev 102559, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerComponent.java)
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,127 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.jboss.as.integration.hornetq.jopr.util.ManagementSupport;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.pluginapi.inventory.*;
+
+import java.lang.reflect.Method;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ * Created 11-Mar-2010
+ */
+public class JMSManagerComponent implements ResourceComponent, CreateChildResourceFacet, JMSComponent
+{
+   private ResourceContext resourceContext;
+
+   public CreateResourceReport createResource(CreateResourceReport createResourceReport)
+   {
+      createResourceReport.setStatus(CreateResourceStatus.IN_PROGRESS);
+      ManagementView managementView = null;
+      try
+      {
+         managementView = getProfileService();
+      }
+      catch (Exception e)
+      {
+         createResourceReport.setStatus(CreateResourceStatus.FAILURE);
+         createResourceReport.setErrorMessage(e.getMessage());
+         e.printStackTrace();
+         return createResourceReport;
+      }
+      Map<String, PropertySimple> simpleProps = createResourceReport.getResourceConfiguration().getSimpleProperties();
+
+      String name = simpleProps.get("name").getStringValue();
+      String jndiName = simpleProps.get("jndiBindings").getStringValue();
+      String DLA = simpleProps.get("dla").getStringValue();
+      String expiryAddress = simpleProps.get("expiryAddress").getStringValue();
+      int maxSize = simpleProps.get("maxSize").getIntegerValue();
+      int pageSize = simpleProps.get("pageSize").getIntegerValue();
+      int maxDeliveryAttempts = simpleProps.get("maxDeliveryAttempts").getIntegerValue();
+      long redeliveryDelay = simpleProps.get("redeliveryDelay").getLongValue();
+      boolean lastValueQueue = simpleProps.get("lastValueQueue").getBooleanValue();
+      long redistributionDelay = simpleProps.get("redistributionDelay").getLongValue();
+      boolean sendToDLAOnNoRoute = simpleProps.get("sendToDLAOnNoRoute").getBooleanValue();
+      String addressFullMessagePolicy = simpleProps.get("addressFullMessagePolicy").getStringValue();
+      try
+      {
+         ManagedOperation operation = ManagementSupport.getOperation(managementView, "QueueManageMO", "createQueue", new ComponentType("JMSDestinationManage", "QueueManage"));
+
+         operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
+             new SimpleValueSupport(SimpleMetaType.STRING, jndiName),
+             new SimpleValueSupport(SimpleMetaType.STRING, DLA),
+             new SimpleValueSupport(SimpleMetaType.STRING, expiryAddress),
+             new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, maxSize),
+             new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, pageSize),
+             new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, maxDeliveryAttempts),
+             new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, redeliveryDelay),
+             new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, lastValueQueue),
+             new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, redistributionDelay),
+             new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, sendToDLAOnNoRoute),
+             new SimpleValueSupport(SimpleMetaType.STRING, addressFullMessagePolicy));
+         createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
+
+      }
+      catch (Exception e)
+      {
+         createResourceReport.setStatus(CreateResourceStatus.FAILURE);
+         createResourceReport.setErrorMessage(e.getMessage());
+         e.printStackTrace();
+      }
+      return createResourceReport;
+   }
+
+
+   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 ManagementView getProfileService() throws Exception
+   {
+      ResourceComponent component = resourceContext.getParentResourceComponent();
+      Method m = component.getClass().getMethod("getConnection");
+      Object conn = m.invoke(component);
+      m = conn.getClass().getMethod("getManagementView");
+      return (ManagementView) m.invoke(conn);
+   }
+}

Copied: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerDiscoveryComponent.java (from rev 102559, branches/Branch_Hornet_Temporary_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerDiscoveryComponent.java)
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerDiscoveryComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerDiscoveryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+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.Collections;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ * Created 11-Mar-2010
+ */
+public class JMSManagerDiscoveryComponent implements ResourceDiscoveryComponent
+{
+   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext ctx) throws InvalidPluginConfigurationException, Exception
+   {
+      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
+            );
+      return Collections.singleton(detail);
+   }
+}

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueComponent2.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueComponent2.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueComponent2.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,139 +1,128 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
-import org.jboss.as.integration.hornetq.jopr.util.*;
-import org.jboss.as.integration.hornetq.management.jms.AddressSettingsMapper;
+import org.jboss.as.integration.hornetq.jopr.util.ManagementSupport;
 import org.jboss.deployers.spi.management.ManagementView;
 import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
 import org.jboss.managed.api.ManagedOperation;
-import org.jboss.metatype.api.types.ArrayMetaType;
 import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
-import org.jboss.metatype.api.types.MetaType;
 import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.*;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.CompositeValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
 import org.rhq.core.domain.configuration.*;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.domain.configuration.definition.PropertyDefinition;
-import org.rhq.core.domain.measurement.*;
+import org.rhq.core.domain.measurement.AvailabilityType;
 import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
 import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.content.ContentFacet;
-import org.rhq.core.pluginapi.inventory.*;
+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.*;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 10:05:08
- * To change this template use File | Settings | File Templates.
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
  */
-public class JMSQueueComponent2 implements ResourceComponent, MeasurementFacet, OperationFacet, ConfigurationFacet
+public class JMSQueueComponent2 extends JMSDestinationComponent implements ResourceComponent, MeasurementFacet, OperationFacet, ConfigurationFacet
 {
    private ResourceContext resourceContext;
 
-   private ComponentType queueComponentType = new ComponentType("JMSDestinationManage", "QueueManage");
+   private static ComponentType queueComponentType = new ComponentType("JMSDestinationManage", "QueueManage");
 
-   String queueComponentName = "JMSQueueManageMO";
+   private static String queueComponentName = "JMSQueueManageMO";
+   private JMSComponent jmsComponent;
 
-   public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
+   @Override
+   String getMeasurementsOperationName()
    {
-      ArrayValueSupport support = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
-      SimpleValueSupport[] valueSupports = new SimpleValueSupport[measurementScheduleRequests.size()];
-      Iterator<MeasurementScheduleRequest> it = measurementScheduleRequests.iterator();
-      for (int i = 0, valueSupportsLength = valueSupports.length; i < valueSupportsLength; i++)
-      {
-         valueSupports[i] = new SimpleValueSupport(SimpleMetaType.STRING, it.next().getName());
-      }
-      support.setValue(valueSupports);
-      ManagementView view = ManagementSupport.connect();
+      return "getQueueMeasurements";
+   }
 
-      ManagedOperation operation = ManagementSupport.getOperation(view, queueComponentName, "getQueueMeasurements", queueComponentType);
-      ArrayValueSupport vals = (ArrayValueSupport) operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()), support);
-      it = measurementScheduleRequests.iterator();
-      for (int i = 0, valueSupportsLength = valueSupports.length; i < valueSupportsLength; i++)
-      {
-         MeasurementScheduleRequest request = it.next();
-         SimpleValueSupport simpleValueSupport = (SimpleValueSupport) vals.getValue(i);
-         simpleValueSupport.getValue();
-         if (request.getDataType().equals(DataType.MEASUREMENT))
-         {
-            report.addData(new MeasurementDataNumeric(request, Double.valueOf(simpleValueSupport.getValue().toString())));
-         }
-         else if (request.getDataType().equals(DataType.TRAIT))
-         {
-            report.addData(new MeasurementDataTrait(request, simpleValueSupport.getValue().toString()));
-         }
-      }
+   public AvailabilityType getAvailability()
+   {
+      return AvailabilityType.UP;
    }
 
-   public OperationResult invokeOperation(String s, Configuration configuration) throws InterruptedException, Exception
+   @Override
+   String getComponentName()
    {
-      Operation oper = Operation.getOperation(s);
-      Collection<PropertySimple> props = configuration.getSimpleProperties().values();
-      SimpleValueSupport[] params = new SimpleValueSupport[props.size()];
-      SimpleValueSupport[] signature = new SimpleValueSupport[props.size()];
-      populateParams(props, params, signature);
-      ArrayValueSupport param = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
-      param.setValue(params);
-      ArrayValueSupport sig = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
-      sig.setValue(signature);
-      SimpleValueSupport queueName = new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey());
-      SimpleValueSupport methodName = new SimpleValueSupport(SimpleMetaType.STRING, oper.getOperationName());
-      ManagementView view = ManagementSupport.connect();
-      String methodOperation = "invokeQueueOperation";
-      if("JMSMessage".equalsIgnoreCase(oper.getResultsType()))
-      {
-         methodOperation = "invokeQueueOperationMessageType";
-      }
-      ManagedOperation operation = ManagementSupport.getOperation(view, queueComponentName, methodOperation, queueComponentType);
-      Object result = operation.invoke(queueName, methodName, param, sig);
-      if (result == null)
-      {
-         return null;
-      }
-      return formatResults(result, oper.getResultsType());
+      return queueComponentName;
    }
 
+   @Override
+   ComponentType getComponentType()
+   {
+      return queueComponentType;
+   }
 
-   public AvailabilityType getAvailability()
+   @Override
+   String getConfigurationOperationName()
    {
-      return AvailabilityType.UP;
+      return "getQueueConfiguration";
    }
 
-   public Configuration loadResourceConfiguration() throws Exception
+   @Override
+   protected String getInvokeOperation()
    {
-      Configuration config = new Configuration();
-      ManagementView view = ManagementSupport.connect();
+      return "invokeQueueOperation";
+   }
 
-      ManagedOperation operation = ManagementSupport.getOperation(view, queueComponentName, "getQueueConfiguration", queueComponentType);
+   @Override
+   protected String getInvokeOperationJMSMessage()
+   {
+      return "invokeQueueOperationMessageType";
+   }
 
-      CompositeValueSupport val = (CompositeValueSupport) operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()));
-
-      ConfigurationDefinition configDef = resourceContext.getResourceType().getResourceConfigurationDefinition();
-      List<PropertyDefinition> propertyDefinitionList = configDef.getPropertiesInGroup("HornetQCustomProperties");
-      for (PropertyDefinition definition : propertyDefinitionList)
-      {
-         String name = definition.getName();
-         if (val.containsKey(name))
-         {
-            SimpleValueSupport attr = (SimpleValueSupport) val.get(name);
-            PropertySimple simple = new PropertySimple(name, attr.getValue());
-            config.put(simple);
-         }
-      }
-      return config;
+   @Override
+   protected String getInvokeOperationSubscriptionMessage()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
 
    public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
    {
       configurationUpdateReport.setStatus(ConfigurationUpdateStatus.INPROGRESS);
 
-      ManagementView view = ManagementSupport.connect();
+      ManagementView view = null;
+      try
+      {
+         view = getProfileService();
+      }
+      catch (Exception e)
+      {
+         configurationUpdateReport.setStatus(ConfigurationUpdateStatus.FAILURE);
+         configurationUpdateReport.setErrorMessage(e.getMessage());
+         e.printStackTrace();
+         return;
+      }
       Map<String, PropertySimple> simpleProps = configurationUpdateReport.getConfiguration().getSimpleProperties();
       String name = simpleProps.get("name").getStringValue();
       String jndiName = simpleProps.get("jndiBindings").getStringValue();
@@ -218,11 +207,13 @@
 
    public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
    {
+      super.start(resourceContext);
       this.resourceContext = resourceContext;
    }
 
    public void stop()
    {
+      super.stop();
       this.resourceContext = null;
    }
 

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent2.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent2.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueDiscoveryComponent2.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,68 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr;
 
-import org.jboss.as.integration.hornetq.jopr.util.LocalProfileServiceConnectionProvider;
-import org.jboss.as.integration.hornetq.jopr.util.ProfileServiceConnection;
-import org.jboss.as.integration.hornetq.jopr.util.ProfileServiceConnectionProvider;
+import org.jboss.as.integration.hornetq.jopr.util.ManagementSupport;
 import org.jboss.deployers.spi.management.ManagementView;
 import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
 import org.jboss.managed.api.ManagedOperation;
 import org.jboss.metatype.api.values.ArrayValueSupport;
-import org.jboss.metatype.api.values.MetaValue;
 import org.jboss.metatype.api.values.SimpleValueSupport;
 import org.rhq.core.domain.configuration.Configuration;
 import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.pluginapi.inventory.*;
+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;
 
 /**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 10-Mar-2010
- * Time: 16:11:46
- * To change this template use File | Settings | File Templates.
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
  */
 public class JMSQueueDiscoveryComponent2 implements ResourceDiscoveryComponent
 {
+   private static final ComponentType componentType = new ComponentType("JMSDestinationManage", "QueueManage");
+
    public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException, Exception
    {
       Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
-      ProfileServiceConnectionProvider connectionProvider = new LocalProfileServiceConnectionProvider();
-      ProfileServiceConnection connection = connectionProvider.connect();
-      ManagementView managementView = connection.getManagementView();
-      ManagedComponent component = managementView.getComponent("JMSQueueManageMO", new ComponentType("JMSDestinationManage", "QueueManage"));
-      Set<ManagedOperation> operations = component.getOperations();
-      for (ManagedOperation operation : operations)
+      JMSComponent context = (JMSComponent) resourceDiscoveryContext.getParentResourceComponent();
+      ManagementView managementView = context.getProfileService();
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSQueueManageMO", "getJMSQueues", componentType);
+
+      ArrayValueSupport value = (ArrayValueSupport) operation.invoke();
+
+      for (int i = 0; i < value.getLength(); i++)
       {
-         if (operation.getName().equals("getJMSQueues"))
-         {
-            ArrayValueSupport value = (ArrayValueSupport) operation.invoke();
-
-            for(int i = 0; i < value.getLength(); i++)
-            {
-               Configuration configuration = new Configuration();
-               SimpleValueSupport queue = (SimpleValueSupport) value.getValue(i);
-               ResourceType resourceType = resourceDiscoveryContext.getResourceType();
-               String queueName = "jms.queue." + queue.getValue();
-               set.add(new DiscoveredResourceDetails(resourceType,
-                   queueName,
-                   queueName,
-                   "a JMS Queue",
-                   "",
-                   configuration,
-                   null));
-            }
-            break;
-         }
+         Configuration configuration = new Configuration();
+         SimpleValueSupport queue = (SimpleValueSupport) value.getValue(i);
+         ResourceType resourceType = resourceDiscoveryContext.getResourceType();
+         String queueName = "jms.queue." + queue.getValue();
+         set.add(new DiscoveredResourceDetails(resourceType,
+             queueName,
+             queueName,
+             "a JMS Queue",
+             "",
+             configuration,
+             null));
       }
-
       return set;
    }
-
-   public CreateResourceReport createResource(CreateResourceReport createResourceReport)
-   {
-      return null;  //To change body of implemented methods use File | Settings | File Templates.
-   }
 }

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicComponent.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.jboss.managed.api.ComponentType;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
+ */
+public class JMSTopicComponent extends JMSDestinationComponent
+{
+   private static ComponentType topicComponentType = new ComponentType("JMSDestinationManage", "TopicManage");
+
+   private static String topicComponentName = "JMSTopicManageMO";
+
+   public AvailabilityType getAvailability()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   @Override
+   String getComponentName()
+   {
+      return topicComponentName;
+   }
+
+   @Override
+   ComponentType getComponentType()
+   {
+      return topicComponentType;
+   }
+
+   @Override
+   String getConfigurationOperationName()
+   {
+      return "getTopicConfiguration";
+   }
+
+   @Override
+  String getMeasurementsOperationName()
+  {
+     return "getTopicMeasurements";
+  }
+
+
+   @Override
+   protected String getInvokeOperation()
+   {
+      return "invokeTopicOperation";
+   }
+
+   @Override
+   protected String getInvokeOperationJMSMessage()
+   {
+      return "invokeTopicOperationMessageType";
+   }
+
+   @Override
+   protected String getInvokeOperationSubscriptionMessage()
+   {
+      return "invokeTopicOperationSubscriptionType";
+   }
+
+   public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent2.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent2.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicDiscoveryComponent2.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.jopr;
+
+import org.jboss.as.integration.hornetq.jopr.util.ManagementSupport;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.metatype.api.values.ArrayValueSupport;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.resource.ResourceType;
+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>
+ */
+public class JMSTopicDiscoveryComponent2 implements ResourceDiscoveryComponent
+{
+   private static final ComponentType componentType = new ComponentType("JMSDestinationManage", "TopicManage");
+
+   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException, Exception
+   {
+      Set<DiscoveredResourceDetails> set = new HashSet<DiscoveredResourceDetails>();
+      JMSComponent context = (JMSComponent) resourceDiscoveryContext.getParentResourceComponent();
+      ManagementView managementView = context.getProfileService();
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSTopicManageMO", "getJMSTopics", componentType);
+
+      ArrayValueSupport value = (ArrayValueSupport) operation.invoke();
+
+      for (int i = 0; i < value.getLength(); i++)
+      {
+         Configuration configuration = new Configuration();
+         SimpleValueSupport queue = (SimpleValueSupport) value.getValue(i);
+         ResourceType resourceType = resourceDiscoveryContext.getResourceType();
+         String queueName = "jms.topic." + queue.getValue();
+         set.add(new DiscoveredResourceDetails(resourceType,
+             queueName,
+             queueName,
+             "a JMS Topic",
+             "",
+             configuration,
+             null));
+      }
+      return set;
+   }
+}
\ No newline at end of file

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,96 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr;
-
-import org.jboss.as.integration.hornetq.jopr.util.LocalProfileServiceConnectionProvider;
-import org.jboss.as.integration.hornetq.jopr.util.ManagementSupport;
-import org.jboss.as.integration.hornetq.jopr.util.ProfileServiceConnection;
-import org.jboss.as.integration.hornetq.jopr.util.ProfileServiceConnectionProvider;
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedComponent;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.ArrayValueSupport;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.content.PackageDetailsKey;
-import org.rhq.core.domain.content.transfer.ResourcePackageDetails;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.domain.resource.CreateResourceStatus;
-import org.rhq.core.pluginapi.inventory.*;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 16:03:42
- * To change this template use File | Settings | File Templates.
- */
-public class QueueManagerComponent implements ResourceComponent, CreateChildResourceFacet
-{
-   public CreateResourceReport createResource(CreateResourceReport createResourceReport)
-   {
-      createResourceReport.setStatus(CreateResourceStatus.IN_PROGRESS);
-      ManagementView managementView = ManagementSupport.connect();
-      Map<String, PropertySimple> simpleProps = createResourceReport.getResourceConfiguration().getSimpleProperties();
-
-      String name = simpleProps.get("name").getStringValue();
-      String jndiName = simpleProps.get("jndiBindings").getStringValue();
-      String DLA = simpleProps.get("dla").getStringValue();
-      String expiryAddress = simpleProps.get("expiryAddress").getStringValue();
-      int maxSize = simpleProps.get("maxSize").getIntegerValue();
-      int pageSize = simpleProps.get("pageSize").getIntegerValue();
-      int maxDeliveryAttempts = simpleProps.get("maxDeliveryAttempts").getIntegerValue();
-      long redeliveryDelay = simpleProps.get("redeliveryDelay").getLongValue();
-      boolean lastValueQueue = simpleProps.get("lastValueQueue").getBooleanValue();
-      long redistributionDelay = simpleProps.get("redistributionDelay").getLongValue();
-      boolean sendToDLAOnNoRoute = simpleProps.get("sendToDLAOnNoRoute").getBooleanValue();
-      String addressFullMessagePolicy = simpleProps.get("addressFullMessagePolicy").getStringValue();
-      try
-      {
-         ManagedOperation operation = ManagementSupport.getOperation(managementView, "QueueManageMO", "createQueue", new ComponentType("JMSDestinationManage", "QueueManage"));
-
-         operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
-             new SimpleValueSupport(SimpleMetaType.STRING, jndiName),
-             new SimpleValueSupport(SimpleMetaType.STRING, DLA),
-             new SimpleValueSupport(SimpleMetaType.STRING, expiryAddress),
-             new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, maxSize),
-             new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, pageSize),
-             new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, maxDeliveryAttempts),
-             new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, redeliveryDelay),
-             new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, lastValueQueue),
-             new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, redistributionDelay),
-             new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, sendToDLAOnNoRoute),
-             new SimpleValueSupport(SimpleMetaType.STRING, addressFullMessagePolicy));
-         createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
-
-      }
-      catch (Exception e)
-      {
-         createResourceReport.setStatus(CreateResourceStatus.FAILURE);
-         createResourceReport.setErrorMessage(e.getMessage());
-         e.printStackTrace();
-      }
-      return createResourceReport;
-   }
-
-
-   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public void stop()
-   {
-      //To change body of implemented methods use File | Settings | File Templates.
-   }
-
-   public AvailabilityType getAvailability()
-   {
-      return AvailabilityType.UP;
-   }
-}

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerDiscoveryComponent.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerDiscoveryComponent.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/QueueManagerDiscoveryComponent.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,35 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr;
-
-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 java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 16:02:33
- * To change this template use File | Settings | File Templates.
- */
-public class QueueManagerDiscoveryComponent implements ResourceDiscoveryComponent
-{
-   public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext ctx) throws InvalidPluginConfigurationException, Exception
-   {
-      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
-            );
-      return Collections.singleton(detail);
-   }
-}

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnection.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnection.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnection.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,39 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr.util;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.profileservice.spi.ProfileKey;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 11:23:07
- * To change this template use File | Settings | File Templates.
- */
-public abstract class AbstractProfileServiceConnection implements ProfileServiceConnection {
-    private static final ProfileKey DEFAULT_PROFILE_KEY = new ProfileKey(ProfileKey.DEFAULT);
-
-    private AbstractProfileServiceConnectionProvider connectionProvider;
-
-    protected AbstractProfileServiceConnection(AbstractProfileServiceConnectionProvider connectionProvider) {
-        this.connectionProvider = connectionProvider;
-    }
-
-    public void init() {
-        ManagementView managementView = getManagementView();
-        managementView.load();
-        DeploymentManager deploymentManager = getDeploymentManager();
-        // Load and associate the given profile with the DeploymentManager for future operations. This is mandatory
-        // in order for us to be able to successfully invoke the various DeploymentManager methods.
-        try {
-            deploymentManager.loadProfile(DEFAULT_PROFILE_KEY);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public ProfileServiceConnectionProvider getConnectionProvider() {
-        return this.connectionProvider;
-    }
-}

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnectionProvider.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnectionProvider.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/AbstractProfileServiceConnectionProvider.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,64 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr.util;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.util.Properties;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 11:25:03
- * To change this template use File | Settings | File Templates.
- */
-public abstract class AbstractProfileServiceConnectionProvider implements ProfileServiceConnectionProvider {
-    
-
-    private ProfileServiceConnection existingConnection;
-
-    public final ProfileServiceConnection connect() {
-        this.existingConnection = doConnect();
-        this.existingConnection.init();
-        return this.existingConnection;
-    }
-
-    protected abstract ProfileServiceConnection doConnect();
-
-    public boolean isConnected() {
-        // TODO: Ping the connection to make sure it's not defunct?
-        return (this.existingConnection != null);
-    }
-
-    public final void disconnect() {
-        if (isConnected()) {
-            this.existingConnection = null;
-            doDisconnect();
-        }
-    }
-
-    protected abstract void doDisconnect();
-
-    public ProfileServiceConnection getExistingConnection() {
-        return this.existingConnection;
-    }
-
-    protected InitialContext createInitialContext(Properties env) {
-        InitialContext initialContext;
-        try {
-            initialContext = new InitialContext(env);
-        } catch (NamingException e) {
-            throw new RuntimeException("Failed to create JNDI InitialContext.", e);
-        }
-        return initialContext;
-    }
-
-    protected Object lookup(InitialContext initialContext, String name) {
-        try {
-            Object found = initialContext.lookup(name);
-            return found;
-        } catch (NamingException e) {
-            throw new RuntimeException("Failed to lookup JNDI name '" + name + "' from InitialContext.", e);
-        }
-    }
-}
-

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BasicProfileServiceConnection.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BasicProfileServiceConnection.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BasicProfileServiceConnection.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,39 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr.util;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.profileservice.spi.ProfileService;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 11:22:30
- * To change this template use File | Settings | File Templates.
- */
-public class BasicProfileServiceConnection extends AbstractProfileServiceConnection {
-    private ProfileService profileService;
-    private ManagementView managementView;
-    private DeploymentManager deploymentManager;
-
-    protected BasicProfileServiceConnection(AbstractProfileServiceConnectionProvider connectionProvider,
-        ProfileService profileService, ManagementView managementView, DeploymentManager deploymentManager) {
-        super(connectionProvider);
-        this.profileService = profileService;
-        this.managementView = managementView;
-        this.deploymentManager = deploymentManager;
-    }
-
-    public ProfileService getProfileService() {
-        return this.profileService;
-    }
-
-    public ManagementView getManagementView() {
-        return this.managementView;
-    }
-
-    public DeploymentManager getDeploymentManager() {
-        return this.deploymentManager;
-    }
-}
-

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BeanNotAvailableException.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BeanNotAvailableException.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/BeanNotAvailableException.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 /**

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/EMSHelper.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/EMSHelper.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/EMSHelper.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 import org.mc4j.ems.connection.ConnectionFactory;
@@ -21,13 +30,8 @@
 import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.plugins.jmx.JMXDiscoveryComponent;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.util.Properties;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Invoker.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Invoker.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Invoker.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,10 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 import org.mc4j.ems.connection.bean.EmsBean;
-import org.mc4j.ems.connection.bean.operation.EmsOperation;
 import org.rhq.core.domain.configuration.PropertySimple;
 
-import javax.management.ObjectName;
 import java.util.Collection;
 import java.util.List;
 

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/JMXInvoker.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/JMXInvoker.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/JMXInvoker.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 import org.mc4j.ems.connection.EmsConnection;

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/LocalProfileServiceConnectionProvider.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/LocalProfileServiceConnectionProvider.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/LocalProfileServiceConnectionProvider.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,31 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr.util;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.profileservice.spi.ProfileService;
-
-import javax.naming.InitialContext;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 11:21:31
- * To change this template use File | Settings | File Templates.
- */
-public class LocalProfileServiceConnectionProvider extends AbstractProfileServiceConnectionProvider {
-    private static final String PROFILE_SERVICE_LOCAL_JNDI_NAME = "java:ProfileService";
-
-    protected BasicProfileServiceConnection doConnect()
-    {
-        InitialContext initialContext = createInitialContext(null);
-        ProfileService profileService = (ProfileService) lookup(initialContext, PROFILE_SERVICE_LOCAL_JNDI_NAME);
-        ManagementView managementView = profileService.getViewManager();
-        DeploymentManager deploymentManager = profileService.getDeploymentManager();
-        return new BasicProfileServiceConnection(this, profileService, managementView, deploymentManager);
-    }
-
-    protected void doDisconnect() {
-        return;
-    }
-}

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ManagementSupport.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ManagementSupport.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ManagementSupport.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,3 +1,24 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 import org.jboss.deployers.spi.management.ManagementView;
@@ -8,21 +29,11 @@
 import java.util.Set;
 
 /**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 16-Mar-2010
- * Time: 15:57:23
- * To change this template use File | Settings | File Templates.
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ * Created 16-Mar-2010
  */
 public class ManagementSupport
 {
-   public static ManagementView connect()
-   {
-      ProfileServiceConnectionProvider connectionProvider = new LocalProfileServiceConnectionProvider();
-      ProfileServiceConnection connection = connectionProvider.connect();
-      return connection.getManagementView();
-   }
-
    public static ManagedOperation getOperation(ManagementView view, String componentName, String operName, ComponentType componentType) throws Exception
    {
       ManagedComponent component = view.getComponent(componentName, componentType);

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Operation.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Operation.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/Operation.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 /**

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnection.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnection.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnection.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,24 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr.util;
-
-import org.jboss.deployers.spi.management.ManagementView;
-import org.jboss.deployers.spi.management.deploy.DeploymentManager;
-import org.jboss.profileservice.spi.ProfileService;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 11:23:48
- * To change this template use File | Settings | File Templates.
- */
-public interface ProfileServiceConnection{
-    void init();
-
-    ProfileServiceConnectionProvider getConnectionProvider();
-
-    ProfileService getProfileService();
-
-    ManagementView getManagementView();
-
-    DeploymentManager getDeploymentManager();
-}

Deleted: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnectionProvider.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnectionProvider.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ProfileServiceConnectionProvider.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,19 +0,0 @@
-package org.jboss.as.integration.hornetq.jopr.util;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 11-Mar-2010
- * Time: 11:24:14
- * To change this template use File | Settings | File Templates.
- */
-public interface ProfileServiceConnectionProvider{
-    boolean isConnected();
-
-    ProfileServiceConnection connect();
-
-    void disconnect();
-
-    ProfileServiceConnection getExistingConnection();
-}
-

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/util/ResultsFormatter.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,15 +1,24 @@
 /*
- * 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.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.jopr.util;
 
 import org.rhq.core.domain.configuration.Configuration;

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,3 +1,24 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.management.jms;
 
 import org.hornetq.core.settings.impl.AddressSettings;
@@ -2,3 +23,7 @@
 import org.hornetq.jms.server.config.JMSQueueConfiguration;
-import org.jboss.metatype.api.types.*;
+import org.hornetq.jms.server.config.TopicConfiguration;
+import org.jboss.metatype.api.types.CompositeMetaType;
+import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.SimpleMetaType;
 import org.jboss.metatype.api.values.CompositeValueSupport;
@@ -11,69 +36,77 @@
 import java.lang.reflect.Type;
 
 /**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 15-Mar-2010
- * Time: 11:38:58
- * To change this template use File | Settings | File Templates.
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ * Created 15-Mar-2010
  */
 public class AddressSettingsMapper extends MetaMapper<Object[]>
 {
    public static final CompositeMetaType ADDRESS_SETTINGS_TYPE;
+
    static
    {
       String[] itemNames = {
-            "name",
-            "jndiBindings",
-            "dla",
-            "expiryAddress",
-            "maxSize",
-            "pageSize",
-            "maxDeliveryAttempts",
-            "redeliveryDelay",
-            "lastValueQueue",
-            "redistributionDelay",
-            "sendToDLAOnNoRoute",
-            "addressFullMessagePolicy"
+          "name",
+          "jndiBindings",
+          "dla",
+          "expiryAddress",
+          "maxSize",
+          "pageSize",
+          "maxDeliveryAttempts",
+          "redeliveryDelay",
+          "lastValueQueue",
+          "redistributionDelay",
+          "sendToDLAOnNoRoute",
+          "addressFullMessagePolicy"
       };
       String[] itemDescriptions = {
-            "name",
-            "jndiBindings",
-            "dla",
-            "expiryAddress",
-            "maxSize",
-            "pageSize",
-            "maxDeliveryAttempts",
-            "redeliveryDelay",
-            "lastValueQueue",
-            "redistributionDelay",
-            "sendToDLAOnNoRoute",
-            "addressFullMessagePolicy"
+          "name",
+          "jndiBindings",
+          "dla",
+          "expiryAddress",
+          "maxSize",
+          "pageSize",
+          "maxDeliveryAttempts",
+          "redeliveryDelay",
+          "lastValueQueue",
+          "redistributionDelay",
+          "sendToDLAOnNoRoute",
+          "addressFullMessagePolicy"
       };
       MetaType[] itemTypes = {
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.INTEGER_PRIMITIVE,
-            SimpleMetaType.INTEGER_PRIMITIVE,
-            SimpleMetaType.INTEGER_PRIMITIVE,
-            SimpleMetaType.LONG_PRIMITIVE,
-            SimpleMetaType.BOOLEAN_PRIMITIVE,
-            SimpleMetaType.LONG_PRIMITIVE,
-            SimpleMetaType.BOOLEAN_PRIMITIVE,
-            SimpleMetaType.STRING
+          SimpleMetaType.STRING,
+          SimpleMetaType.STRING,
+          SimpleMetaType.STRING,
+          SimpleMetaType.STRING,
+          SimpleMetaType.INTEGER_PRIMITIVE,
+          SimpleMetaType.INTEGER_PRIMITIVE,
+          SimpleMetaType.INTEGER_PRIMITIVE,
+          SimpleMetaType.LONG_PRIMITIVE,
+          SimpleMetaType.BOOLEAN_PRIMITIVE,
+          SimpleMetaType.LONG_PRIMITIVE,
+          SimpleMetaType.BOOLEAN_PRIMITIVE,
+          SimpleMetaType.STRING
       };
       ADDRESS_SETTINGS_TYPE = new ImmutableCompositeMetaType("org.hornetq.core.settings.impl.AddressSettings", "Address Settings",
-            itemNames, itemDescriptions, itemTypes);
+          itemNames, itemDescriptions, itemTypes);
    }
+
    @Override
    public MetaValue createMetaValue(MetaType metaType, Object[] val)
    {
       CompositeValueSupport cvs = new CompositeValueSupport(ADDRESS_SETTINGS_TYPE);
-      JMSQueueConfiguration queueConfiguration = (JMSQueueConfiguration) val[0];
-      cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, queueConfiguration.getName()));
-      cvs.set("jndiBindings", new SimpleValueSupport(SimpleMetaType.STRING, getJndiString(queueConfiguration.getBindings())));
+      if (val[0] instanceof JMSQueueConfiguration)
+      {
+         JMSQueueConfiguration queueConfiguration = (JMSQueueConfiguration) val[0];
+         cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, queueConfiguration.getName()));
+         cvs.set("jndiBindings", new SimpleValueSupport(SimpleMetaType.STRING, getJndiString(queueConfiguration.getBindings())));
+      }
+      else
+      {
+         TopicConfiguration topicConfiguration = (TopicConfiguration) val[0];
+         cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, topicConfiguration.getName()));
+         cvs.set("jndiBindings", new SimpleValueSupport(SimpleMetaType.STRING, getJndiString(topicConfiguration.getBindings())));
+      }
       AddressSettings addressSettings = (AddressSettings) val[1];
       cvs.set("dla", new SimpleValueSupport(SimpleMetaType.STRING, addressSettings.getDeadLetterAddress()));
       cvs.set("expiryAddress", new SimpleValueSupport(SimpleMetaType.STRING, addressSettings.getExpiryAddress()));
@@ -111,7 +144,7 @@
       StringBuffer sb = new StringBuffer();
       for (int i = 0, arrayLength = array.length; i < arrayLength; i++)
       {
-         if(i > 0)
+         if (i > 0)
          {
             sb.append(",");
          }

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.management.jms;
+
+import org.hornetq.api.core.management.ResourceNames;
+import org.hornetq.api.jms.management.ConnectionFactoryControl;
+import org.hornetq.api.jms.management.JMSServerControl;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.management.ManagementService;
+import org.jboss.managed.api.annotation.*;
+import org.jboss.metatype.api.annotations.MetaMapping;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created Mar 19, 2010
+ */
+ at ManagementObject(componentType = @ManagementComponent(type = "JMSManage", subtype = "ConnectionFactoryManage"),
+    properties = ManagementProperties.EXPLICIT, isRuntime = true)
+public class ConnectionFactoryManageMO extends JMSDestinationManageMO
+{
+   public ConnectionFactoryManageMO(HornetQServer server)
+   {
+      super(server);
+      this.server = server;
+   }
+
+   private JMSServerControl jmsServerControl;
+
+   private ManagementService managementService;
+
+   private HornetQServer server;
+
+   public void start()
+   {
+      managementService = server.getManagementService();
+      jmsServerControl = (JMSServerControl) managementService.getResource(ResourceNames.JMS_SERVER);
+   }
+
+   @ManagementOperation(name = "getConfiguration", description = "returns the JMS Connection Factory configuration",
+       params = {@ManagementParameter(name = "name", description = "the connection factory name")})
+   @MetaMapping(value = ConnectionFactoryMapper.class)
+   public ConnectionFactoryControl getConfiguration(String name)
+   {
+      return (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
+   }
+
+   @ManagementOperation(name = "getMeasurements", description = "gets a connection factories",
+       params = {
+           @ManagementParameter(name = "name", description = "the queue name"),
+           @ManagementParameter(name = "names", description = "the measurement names")})
+   public String[] getMeasurements(String name, String[] names) throws Exception
+   {
+      ConnectionFactoryControl control = (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
+      String[] val = new String[names.length];
+      for (int i = 0, valLength = val.length; i < valLength; i++)
+      {
+         val[i] = control.getClass().getMethod(names[i]).invoke(control).toString();
+      }
+      return val;
+   }
+   @ManagementOperation(name = "getConnectionFactories", description = "returns the JMS Connection Factories")
+   public String[] getJMSConnectionFactories()
+   {
+      return jmsServerControl.getConnectionFactoryNames();
+   }
+
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,218 @@
+/*
+ * 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.management.jms;
+
+import org.hornetq.api.jms.management.ConnectionFactoryControl;
+import org.jboss.metatype.api.types.CompositeMetaType;
+import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.CompositeValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.jboss.metatype.spi.values.MetaMapper;
+
+import java.lang.reflect.Type;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created Mar 19, 2010
+ */
+public class ConnectionFactoryMapper extends MetaMapper<ConnectionFactoryControl>
+{
+   public static final CompositeMetaType TYPE;
+
+   static
+   {
+      String[] itemNames = {
+            "name",
+            "Bindings",
+            "DiscoveryAddress",
+            "DiscoveryPort",
+            "DiscoveryRefreshTimeout",
+            "ClientID",
+            "DupsOKBatchSize",
+            "TransactionBatchSize",
+            "ClientFailureCheckPeriod",
+            "ConnectionTTL",
+            "CallTimeout",
+            "ConsumerWindowSize",
+            "ConfirmationWindowSize",
+            "ProducerMaxRate",
+            "ProducerWindowSize",
+            "CacheLargeMessagesClient",
+            "MinLargeMessageSize",
+            "BlockOnNonDurableSend",
+            "BlockOnAcknowledge",
+            "BlockOnDurableSend",
+            "AutoGroup",
+            "PreAcknowledge",
+            "MaxRetryInterval",
+            "RetryIntervalMultiplier",
+            "ReconnectAttempts",
+            "FailoverOnServerShutdown",
+            "ScheduledThreadPoolMaxSize",
+            "ThreadPoolMaxSize",
+            "GroupID",
+            "InitialMessagePacketSize",
+            "UseGlobalPools",
+            "RetryInterval",
+            "ConnectionLoadBalancingPolicyClassName"
+      };
+      String[] itemDescriptions = {
+            "name",
+            "Bindings",
+            "DiscoveryAddress",
+            "DiscoveryPort",
+            "DiscoveryRefreshTimeout",
+            "ClientID",
+            "DupsOKBatchSize",
+            "TransactionBatchSize",
+            "ClientFailureCheckPeriod",
+            "ConnectionTTL",
+            "CallTimeout",
+            "ConsumerWindowSize",
+            "ConfirmationWindowSize",
+            "ProducerMaxRate",
+            "ProducerWindowSize",
+            "CacheLargeMessagesClient",
+            "MinLargeMessageSize",
+            "BlockOnNonDurableSend",
+            "BlockOnAcknowledge",
+            "BlockOnDurableSend",
+            "AutoGroup",
+            "PreAcknowledge",
+            "MaxRetryInterval",
+            "RetryIntervalMultiplier",
+            "ReconnectAttempts",
+            "FailoverOnServerShutdown",
+            "ScheduledThreadPoolMaxSize",
+            "ThreadPoolMaxSize",
+            "GroupID",
+            "InitialMessagePacketSize",
+            "UseGlobalPools",
+            "RetryInterval",
+            "ConnectionLoadBalancingPolicyClassName"
+      };
+      MetaType[] itemTypes = {
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING
+      };
+      TYPE = new ImmutableCompositeMetaType("javax.jms.ConnectionFactory", "Connection Factory Settings",
+            itemNames, itemDescriptions, itemTypes);
+   }
+
+   @Override
+   public MetaValue createMetaValue(MetaType metaType, ConnectionFactoryControl control)
+   {
+      CompositeValueSupport cvs = new CompositeValueSupport(TYPE);
+      cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, control.getName()));
+      cvs.set("Bindings", new SimpleValueSupport(SimpleMetaType.STRING, getJndiString(control.getBindings())));
+      cvs.set("DiscoveryAddress", new SimpleValueSupport(SimpleMetaType.STRING, control.getDiscoveryAddress()));
+      cvs.set("DiscoveryPort", new SimpleValueSupport(SimpleMetaType.STRING, control.getDiscoveryPort()));
+      cvs.set("DiscoveryRefreshTimeout", new SimpleValueSupport(SimpleMetaType.STRING, control.getDiscoveryRefreshTimeout()));
+      cvs.set("ClientID", new SimpleValueSupport(SimpleMetaType.STRING, control.getClientID()));
+      cvs.set("DupsOKBatchSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getDupsOKBatchSize()));
+      cvs.set("TransactionBatchSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getTransactionBatchSize()));
+      cvs.set("ClientFailureCheckPeriod", new SimpleValueSupport(SimpleMetaType.STRING, control.getClientFailureCheckPeriod()));
+      cvs.set("ConnectionTTL", new SimpleValueSupport(SimpleMetaType.STRING, control.getConnectionTTL()));
+      cvs.set("CallTimeout", new SimpleValueSupport(SimpleMetaType.STRING, control.getCallTimeout()));
+      cvs.set("ConsumerWindowSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getConfirmationWindowSize()));
+      cvs.set("ConfirmationWindowSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getConfirmationWindowSize()));
+      cvs.set("ProducerMaxRate", new SimpleValueSupport(SimpleMetaType.STRING, control.getProducerMaxRate()));
+      cvs.set("ProducerWindowSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getProducerWindowSize()));
+      cvs.set("CacheLargeMessagesClient", new SimpleValueSupport(SimpleMetaType.STRING, control.isCacheLargeMessagesClient()));
+      cvs.set("MinLargeMessageSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getMinLargeMessageSize()));
+      cvs.set("BlockOnNonDurableSend", new SimpleValueSupport(SimpleMetaType.STRING, control.isBlockOnNonDurableSend()));
+      cvs.set("BlockOnAcknowledge", new SimpleValueSupport(SimpleMetaType.STRING, control.isBlockOnAcknowledge()));
+      cvs.set("BlockOnDurableSend", new SimpleValueSupport(SimpleMetaType.STRING, control.isBlockOnDurableSend()));
+      cvs.set("AutoGroup", new SimpleValueSupport(SimpleMetaType.STRING, control.isAutoGroup()));
+      cvs.set("PreAcknowledge", new SimpleValueSupport(SimpleMetaType.STRING, control.isPreAcknowledge()));
+      cvs.set("MaxRetryInterval", new SimpleValueSupport(SimpleMetaType.STRING, control.getMaxRetryInterval()));
+      cvs.set("RetryIntervalMultiplier", new SimpleValueSupport(SimpleMetaType.STRING, control.getRetryIntervalMultiplier()));
+      cvs.set("ReconnectAttempts", new SimpleValueSupport(SimpleMetaType.STRING, control.getReconnectAttempts()));
+      cvs.set("FailoverOnServerShutdown", new SimpleValueSupport(SimpleMetaType.STRING, control.isFailoverOnServerShutdown()));
+      cvs.set("ScheduledThreadPoolMaxSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getScheduledThreadPoolMaxSize()));
+      cvs.set("ThreadPoolMaxSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getThreadPoolMaxSize()));
+      cvs.set("GroupID", new SimpleValueSupport(SimpleMetaType.STRING, control.getGroupID()));
+      cvs.set("InitialMessagePacketSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getInitialMessagePacketSize()));
+      cvs.set("UseGlobalPools", new SimpleValueSupport(SimpleMetaType.STRING, control.isUseGlobalPools()));
+      cvs.set("RetryInterval", new SimpleValueSupport(SimpleMetaType.STRING, control.getRetryInterval()));
+      cvs.set("ConnectionLoadBalancingPolicyClassName", new SimpleValueSupport(SimpleMetaType.STRING, control.getConnectionLoadBalancingPolicyClassName()));
+      return cvs;
+   }
+
+   @Override
+   public ConnectionFactoryControl unwrapMetaValue(MetaValue metaValue)
+   {
+      return null;
+   }
+
+   @Override
+   public Type mapToType()
+   {
+      return ConnectionFactoryControl.class;
+   }
+
+   @Override
+   public MetaType getMetaType()
+   {
+      return TYPE;
+   }
+
+   private String getJndiString(List<String> array)
+   {
+      StringBuffer sb = new StringBuffer();
+      for (String o : array)
+      {
+         if (sb.length() > 0)
+         {
+            sb.append(",");
+         }
+         sb.append(o);
+      }
+      return sb.toString();
+   }
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/JMSDestinationManageMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/JMSDestinationManageMO.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/JMSDestinationManageMO.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,108 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.management.jms;
+
+import org.hornetq.api.core.management.ResourceNames;
+import org.hornetq.api.jms.management.JMSServerControl;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.management.ManagementService;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
+ */
+public class JMSDestinationManageMO
+{
+   protected JMSServerControl jmsServerControl;
+   protected ManagementService managementService;
+   private HornetQServer server;
+
+   public JMSDestinationManageMO(HornetQServer server)
+   {
+      this.server = server;
+   }
+
+   public void start()
+   {
+      managementService = server.getManagementService();
+      jmsServerControl = (JMSServerControl) managementService.getResource(ResourceNames.JMS_SERVER);
+   }
+
+   protected Object[] getParams(String[] params, Class[] classes)
+   {
+      Object[] objects = new Object[params.length];
+      for (int i = 0, objectsLength = objects.length; i < objectsLength; i++)
+      {
+         if("null".equalsIgnoreCase(params[i]))
+         {
+            objects[i] = null;
+         }
+         else if (classes[i] == String.class)
+         {
+            objects[i] = params[i];
+         }
+         else if (classes[i] == Double.class)
+         {
+            objects[i] = Double.valueOf(params[i]);
+         }
+         else if (classes[i] == double.class)
+         {
+            objects[i] = Double.valueOf(params[i]);
+         }
+         else if (classes[i] == Long.class)
+         {
+            objects[i] = Long.valueOf(params[i]);
+         }
+         else if (classes[i] == long.class)
+         {
+            objects[i] = Long.valueOf(params[i]);
+         }
+         else if (classes[i] == Integer.class)
+         {
+            objects[i] = Integer.valueOf(params[i]);
+         }
+         else if (classes[i] == int.class)
+         {
+            objects[i] = Integer.valueOf(params[i]);
+         }
+         else if (classes[i] == Float.class)
+         {
+            objects[i] = Float.valueOf(params[i]);
+         }
+         else if (classes[i] == float.class)
+         {
+            objects[i] = Float.valueOf(params[i]);
+         }
+      }
+      return objects;
+   }
+
+   protected Class[] getClassTypes(String[] type) throws Exception
+   {
+      Class[] classes = new Class[type.length];
+      for (int i = 0, typeLength = type.length; i < typeLength; i++)
+      {
+         classes[i] = Class.forName(type[i]);
+      }
+      return classes;
+   }
+}

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageImplMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageImplMO.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageImplMO.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,7 +1,26 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.management.jms;
 
-import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.management.HornetQServerControl;
 import org.hornetq.api.core.management.ResourceNames;
 import org.hornetq.api.jms.management.JMSQueueControl;
 import org.hornetq.api.jms.management.JMSServerControl;
@@ -13,28 +32,27 @@
 import org.jboss.metatype.api.annotations.MetaMapping;
 
 import java.io.Serializable;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 10-Mar-2010
- * Time: 14:48:43
- * To change this template use File | Settings | File Templates.
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ * Created 10-Mar-2010
  */
 @ManagementObject(componentType = @ManagementComponent(type = "JMSDestinationManage", subtype = "QueueManage"),
     properties = ManagementProperties.EXPLICIT, isRuntime = true)
-public class QueueManageImplMO
+public class QueueManageImplMO extends JMSDestinationManageMO
 {
    private JMSServerControl jmsServerControl;
    private ManagementService managementService;
    private HornetQServer server;
-   private HornetQServerControl hornetQServerControl;
 
    public QueueManageImplMO(HornetQServer server)
    {
+      super(server);
       this.server = server;
    }
 
@@ -42,7 +60,6 @@
    {
       managementService = server.getManagementService();
       jmsServerControl = (JMSServerControl) managementService.getResource(ResourceNames.JMS_SERVER);
-      hornetQServerControl = (HornetQServerControl) managementService.getResource(ResourceNames.CORE_SERVER);
    }
 
    @ManagementOperation(name = "createQueue", description = "Creates a new Queue",
@@ -175,15 +192,7 @@
       JMSQueueControl control = (JMSQueueControl) managementService.getResource(name);
       Class[] classes = getClassTypes(type);
       Method m = control.getClass().getMethod(method, classes);
-      try
-      {
-         return m.invoke(control, getParams(params, classes));
-      }
-      catch (Exception e)
-      {
-         e.printStackTrace();
-         return e;
-      }
+      return m.invoke(control, getParams(params, classes));
    }
 
    @ManagementOperation(name = "invokeQueueOperationMessageType", description = "invokes a queues method",
@@ -197,79 +206,12 @@
       JMSQueueControl control = (JMSQueueControl) managementService.getResource(name);
       Class[] classes = getClassTypes(type);
       Method m = control.getClass().getMethod(method, classes);
-      try
-      {
-         Map<String, Serializable>[] maps = (Map<String, Serializable>[]) m.invoke(control, getParams(params, classes));
-         List list = new ArrayList();
-         list.addAll(Arrays.asList(maps));
-         return list;
-      }
-      catch (Exception e)
-      {
-         e.printStackTrace();
-         return Collections.singletonList(e);
-      }
+      Map<String, Serializable>[] maps = (Map<String, Serializable>[]) m.invoke(control, getParams(params, classes));
+      List list = new ArrayList();
+      list.addAll(Arrays.asList(maps));
+      return list;
    }
 
-   private Object[] getParams(String[] params, Class[] classes)
-   {
-      Object[] objects = new Object[params.length];
-      for (int i = 0, objectsLength = objects.length; i < objectsLength; i++)
-      {
-         if("null".equalsIgnoreCase(params[i]))
-         {
-            objects[i] = null;
-         }
-         else if (classes[i] == String.class)
-         {
-            objects[i] = params[i];
-         }
-         else if (classes[i] == Double.class)
-         {
-            objects[i] = Double.valueOf(params[i]);
-         }
-         else if (classes[i] == double.class)
-         {
-            objects[i] = Double.valueOf(params[i]);
-         }
-         else if (classes[i] == Long.class)
-         {
-            objects[i] = Long.valueOf(params[i]);
-         }
-         else if (classes[i] == long.class)
-         {
-            objects[i] = Long.valueOf(params[i]);
-         }
-         else if (classes[i] == Integer.class)
-         {
-            objects[i] = Integer.valueOf(params[i]);
-         }
-         else if (classes[i] == int.class)
-         {
-            objects[i] = Integer.valueOf(params[i]);
-         }
-         else if (classes[i] == Float.class)
-         {
-            objects[i] = Float.valueOf(params[i]);
-         }
-         else if (classes[i] == float.class)
-         {
-            objects[i] = Float.valueOf(params[i]);
-         }
-      }
-      return objects;
-   }
-
-   private Class[] getClassTypes(String[] type) throws Exception
-   {
-      Class[] classes = new Class[type.length];
-      for (int i = 0, typeLength = type.length; i < typeLength; i++)
-      {
-         classes[i] = Class.forName(type[i]);
-      }
-      return classes;
-   }
-
    @ManagementOperation(name = "getJMSQueues", description = "returns the JMS Queues")
    public String[] getJMSQueues()
    {

Modified: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageMO.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,3 +1,24 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
 package org.jboss.as.integration.hornetq.management.jms;
 
 import org.jboss.managed.api.annotation.*;
@@ -3,9 +24,5 @@
 
 /**
- * Created by IntelliJ IDEA.
- * User: andy
- * Date: 10-Mar-2010
- * Time: 14:30:39
- * To change this template use File | Settings | File Templates.
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
  */
 @ManagementObject(name = "QueueManageMO", componentType = @ManagementComponent(type = "JMSDestinationManage", subtype = "QueueManage"),

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/SubscriptionInfoMapper.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/SubscriptionInfoMapper.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/SubscriptionInfoMapper.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,132 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.management.jms;
+
+import org.jboss.logging.Logger;
+import org.jboss.metatype.api.types.*;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.CompositeValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.jboss.metatype.spi.values.MetaMapper;
+
+import java.io.Serializable;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
+ */
+public class SubscriptionInfoMapper  extends MetaMapper<Object[]>
+{
+   private static final Logger log = Logger.getLogger(MessageListMapper.class);
+   public static final CollectionMetaType TYPE;
+   public static final CompositeMetaType MSG_TYPE;
+
+   static
+   {
+      String[] itemNames = {
+            "name",
+            "clientID",
+            "subName",
+            "durable",
+            "messageCount",
+            "filter"
+      };
+      String[] itemDescriptions = {
+            "name",
+            "clientID",
+            "subName",
+            "durable",
+            "messageCount",
+            "filter"
+      };
+      MetaType[] itemTypes = {
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING,
+            SimpleMetaType.STRING
+      };
+      MSG_TYPE = new ImmutableCompositeMetaType("javax.jms.Message", "JMS Message",
+            itemNames, itemDescriptions, itemTypes);
+      TYPE = new CollectionMetaType("java.util.List", MSG_TYPE);
+   }
+
+   @Override
+   public MetaValue createMetaValue(MetaType metaType, Object[] object)
+   {
+      ArrayList<MetaValue> tmp = new ArrayList<MetaValue>();
+      if(object != null)
+      {
+         for(Object o : object)
+         {
+            Object[] m = (Object[]) o;
+            try
+            {
+               CompositeValueSupport cvs = new CompositeValueSupport(MSG_TYPE);
+               if(m[0] != null)
+                  cvs.set("name", SimpleValueSupport.wrap((Serializable) m[0].toString()));
+               if(m[1] != null)
+                  cvs.set("clientID", SimpleValueSupport.wrap((Serializable) m[1].toString()));
+               if(m[2] != null)
+                  cvs.set("subName", SimpleValueSupport.wrap((Serializable) m[2].toString()));
+               if(m[3] != null)
+                  cvs.set("durable", SimpleValueSupport.wrap((Serializable) m[3].toString()));
+               if(m[4] != null)
+                  cvs.set("messageCount", SimpleValueSupport.wrap((Serializable) m[4].toString()));
+               if(m[5] != null)
+                  cvs.set("filter", SimpleValueSupport.wrap((Serializable) m[5].toString()));
+               tmp.add(cvs);
+            }
+            catch(Exception e)
+            {
+               log.warn("Skipping msg: "+m, e);
+            }
+         }
+      }
+      MetaValue[] elements = new MetaValue[tmp.size()];
+      tmp.toArray(elements);
+      CollectionValueSupport msgs = new CollectionValueSupport(TYPE, elements);
+      return msgs;
+   }
+
+   @Override
+   public MetaType getMetaType()
+   {
+      return TYPE;
+   }
+
+   @Override
+   public Type mapToType()
+   {
+      return Object[].class;
+   }
+
+   @Override
+   public Object[] unwrapMetaValue(MetaValue metaValue)
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+}

Added: trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java
===================================================================
--- trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java	                        (rev 0)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java	2010-03-19 19:13:19 UTC (rev 102635)
@@ -0,0 +1,145 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.integration.hornetq.management.jms;
+
+import org.hornetq.api.core.management.ResourceNames;
+import org.hornetq.api.jms.management.JMSServerControl;
+import org.hornetq.api.jms.management.TopicControl;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.management.ManagementService;
+import org.hornetq.jms.server.config.TopicConfiguration;
+import org.hornetq.jms.server.config.impl.TopicConfigurationImpl;
+import org.jboss.managed.api.annotation.*;
+import org.jboss.metatype.api.annotations.MetaMapping;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
+ *         Created: 17-Mar-2010
+ */
+ at ManagementObject(componentType = @ManagementComponent(type = "JMSDestinationManage", subtype = "TopicManage"),
+    properties = ManagementProperties.EXPLICIT, isRuntime = true)
+public class TopicManageMO extends JMSDestinationManageMO
+{
+   private JMSServerControl jmsServerControl;
+   private ManagementService managementService;
+   private HornetQServer server;
+
+   public TopicManageMO(HornetQServer server)
+   {
+      super(server);
+      this.server = server;
+   }
+
+   public void start()
+   {
+      managementService = server.getManagementService();
+      jmsServerControl = (JMSServerControl) managementService.getResource(ResourceNames.JMS_SERVER);
+   }
+   
+   @ManagementOperation(name = "getTopicConfiguration", description = "Returns a topics configuration",
+       params = {@ManagementParameter(name = "name", description = "the queue name")})
+   @MetaMapping(value = AddressSettingsMapper.class)
+   public Object[] getTopicConfiguration(String name)
+   {
+      Object[] config = new Object[2];
+      TopicControl control = (TopicControl) managementService.getResource(name);
+      TopicConfiguration topicConfiguration = new TopicConfigurationImpl(control.getName(), control.getJNDIBinding());
+      config[0] = topicConfiguration;
+      config[1] = jmsServerControl.getAddressSettings(name);
+      return config;
+   }
+
+   @ManagementOperation(name = "getTopicMeasurements", description = "updates a queues configuration",
+       params = {
+           @ManagementParameter(name = "name", description = "the queue name"),
+           @ManagementParameter(name = "names", description = "the measurement names")})
+   public String[] getTopicMeasurements(String name, String[] names) throws Exception
+   {
+      TopicControl control = (TopicControl) managementService.getResource(name);
+      String[] val = new String[names.length];
+      for (int i = 0, valLength = val.length; i < valLength; i++)
+      {
+         val[i] = control.getClass().getMethod(names[i]).invoke(control).toString();
+      }
+      return val;
+   }
+
+    @ManagementOperation(name = "invokeTopicOperation", description = "invokes a queues method",
+       params = {
+           @ManagementParameter(name = "name", description = "the topic name"),
+           @ManagementParameter(name = "method", description = "the method"),
+           @ManagementParameter(name = "params", description = "the method params")})
+   public Object invokeTopicOperation(String name, String method, String[] params, String[] type) throws Exception
+   {
+      TopicControl control = (TopicControl) managementService.getResource(name);
+      Class[] classes = getClassTypes(type);
+      Method m = control.getClass().getMethod(method, classes);
+      return m.invoke(control, getParams(params, classes));
+   }
+
+   @ManagementOperation(name = "invokeTopicOperationMessageType", description = "invokes a queues method",
+       params = {
+           @ManagementParameter(name = "name", description = "the topic name"),
+           @ManagementParameter(name = "method", description = "the method"),
+           @ManagementParameter(name = "params", description = "the method params")})
+   @MetaMapping(value = MessageListMapper.class)
+   public List invokeTopicOperationMessageType(String name, String method, String[] params, String[] type) throws Exception
+   {
+      TopicControl control = (TopicControl) managementService.getResource(name);
+      Class[] classes = getClassTypes(type);
+      Method m = control.getClass().getMethod(method, classes);
+
+      Map<String, Serializable>[] maps = (Map<String, Serializable>[]) m.invoke(control, getParams(params, classes));
+      List list = new ArrayList();
+      list.addAll(Arrays.asList(maps));
+      return list;
+   }
+
+   @ManagementOperation(name = "invokeTopicOperationSubscriptionType", description = "invokes a queues method",
+       params = {
+           @ManagementParameter(name = "name", description = "the topic name"),
+           @ManagementParameter(name = "method", description = "the method"),
+           @ManagementParameter(name = "params", description = "the method params")})
+   @MetaMapping(value = SubscriptionInfoMapper.class)
+   public Object[] invokeTopicOperationSubscriptionType(String name, String method, String[] params, String[] type) throws Exception
+   {
+      TopicControl control = (TopicControl) managementService.getResource(name);
+      Class[] classes = getClassTypes(type);
+      Method m = control.getClass().getMethod(method, classes);
+
+      Object[] maps = (Object[]) m.invoke(control, getParams(params, classes));
+      return maps;
+   }
+
+   @ManagementOperation(name = "getJMSTopics", description = "returns the JMS Topics")
+   public String[] getJMSTopics()
+   {
+      return jmsServerControl.getTopicNames();
+   }
+}

Modified: trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml
===================================================================
--- trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-03-19 19:13:19 UTC (rev 102635)
@@ -1,5 +1,31 @@
 <?xml version="1.0"?>
 
+<!DOCTYPE plugin [
+
+      <!ENTITY destinationMetrics '
+                 <metric property="getName"
+                 displayName="Name"
+                 description="name of this queue"
+                 dataType="trait" displayType="summary"/>
+                 <metric property="getJNDIBinding"
+                 displayName="JNDI Binding"
+                 description="JNDI Binding of this queue"
+                 dataType="trait" displayType="summary"/>
+                 <metric property="getAddress"
+                 displayName="Address"
+                 description="Address of this queue"
+                 dataType="trait" displayType="summary"/>
+                 <metric property="isTemporary"
+                 displayName="Temporary"
+                 description="If this queue is Temporary"
+                 dataType="trait" displayType="summary"/>
+                 <metric property="getMessageCount"
+                 displayName="Message Count"
+                 description="number of messages currently in this destination"
+                 dataType="trait" displayType="summary"/>
+'>
+      ]>
+
 <plugin name="HornetQ"
         displayName="HornetQPlugin"
         description="Supports management and monitoring of HornetQ Servers"
@@ -11,8 +37,8 @@
 
    <depends plugin="JMX" useClasses="true"/>
    <service name="JMS Manager"
-            discovery="QueueManagerDiscoveryComponent"
-            class="QueueManagerComponent"
+            discovery="JMSManagerDiscoveryComponent"
+            class="JMSManagerComponent"
             singleton="true">
 
       <runs-inside>
@@ -148,7 +174,7 @@
                                   displayName="The name of the queue to move the message to"/>
             </parameters>
             <results>
-                <c:simple-property name="operationResult" type="integer" description="Number of moved messages."/>
+               <c:simple-property name="operationResult" type="integer" description="Number of moved messages."/>
             </results>
          </operation>
          <operation name="listMessageCounter" displayName="list message counter"
@@ -182,6 +208,7 @@
          </operation>
          <operation name="resume" displayName="resume the queue" description="Resume the queue.">
          </operation>
+         &destinationMetrics;
          <metric property="getMessageCount"
                  displayName="Message Count"
                  description="number of messages currently in this destination"
@@ -208,10 +235,10 @@
                  dataType="trait" displayType="summary"/>
          <resource-configuration>
             <c:group name="HornetQCustomProperties" displayName="Destination Options">
-               <c:simple-property name="name" displayName="The Queues Name" required="true">
+               <c:simple-property name="name" displayName="The Queues Name" required="true" readOnly="true">
                   <c:description>The Name of the queue to deploy</c:description>
                </c:simple-property>
-               <c:simple-property name="jndiBindings" displayName="The Queues JNDI Name" required="true">
+               <c:simple-property name="jndiBindings" displayName="The Queues JNDI Name" required="true" readOnly="true">
                   <c:description>The JNDI Name of the queue to deploy</c:description>
                </c:simple-property>
                <c:simple-property name="dla" displayName="Dead Letter Address" required="false">
@@ -255,35 +282,286 @@
                                   displayName="Address Full Message Policy" required="true">
                   <c:description>The policy to use when this Address is full (PAGE,DROP,BLOCK)</c:description>
                </c:simple-property>
-                <c:list-property name="securityConfig"
-                                 displayName="Security Configurations"
-                                 description="This element specifies a XML fragment which describes the access control list to be used by the SecurityManager to authorize client operations against the destination. The content model is the same as for the SecurityManager SecurityConf attribute.">
-                    <c:map-property name="role"
-                                    displayName="Security Configuration Attributes"
-                                    description="These are the attributes that define the role name, and if the role is allowed to read, write or create Messages on this Queue">
-                       <c:simple-property name="name"
-                                           displayName="Read"
-                                           description="The name of the role?"
-                                           summary="true"
-                                           required="true"
-                                           type="string"/>
-                       <c:simple-property name="send"
-                                           displayName="Read"
-                                           description="Is this role allowed to write messages to this address?"
-                                           summary="true"
-                                           required="true"
-                                           type="boolean"/>
-                        <c:simple-property name="consume"
-                                           displayName="Write"
-                                           description="Is this role allowed to read messages from this address?"
-                                           summary="true"
-                                           required="true"
-                                           type="boolean"/>
-                    </c:map-property>
+               <c:list-property name="securityConfig"
+                                displayName="Security Configurations"
+                                description="This element specifies a XML fragment which describes the access control list to be used by the SecurityManager to authorize client operations against the destination. The content model is the same as for the SecurityManager SecurityConf attribute.">
+                  <c:map-property name="role"
+                                  displayName="Security Configuration Attributes"
+                                  description="These are the attributes that define the role name, and if the role is allowed to read, write or create Messages on this Queue">
+                     <c:simple-property name="name"
+                                        displayName="Read"
+                                        description="The name of the role?"
+                                        summary="true"
+                                        required="true"
+                                        type="string"/>
+                     <c:simple-property name="send"
+                                        displayName="Read"
+                                        description="Is this role allowed to write messages to this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                     <c:simple-property name="consume"
+                                        displayName="Write"
+                                        description="Is this role allowed to read messages from this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                  </c:map-property>
 
-                </c:list-property>
+               </c:list-property>
             </c:group>
          </resource-configuration>
       </service>
+      <service name="JMS Topic"
+               discovery="JMSTopicDiscoveryComponent2"
+               class="JMSTopicComponent"
+               createDeletePolicy="both">
+         <operation name="listAllSubscriptions,result=SubscriptionInfo" displayName="list all subscriptions"
+                    description="Lists all the subscriptions for this topic (both durable and non-durable).">
+            <results>
+               <c:list-property name="result">
+                  <c:map-property required="false" name="element">
+                     <c:simple-property type="string" name="name"/>
+                     <c:simple-property type="string" required="false" name="clientID"/>
+                     <c:simple-property type="string" required="false" name="subName"/>
+                     <c:simple-property type="boolean" required="false" name="durable"/>
+                     <c:simple-property type="integer" name="messageCount"/>
+                     <c:simple-property type="string" name="filter"/>
+                  </c:map-property>
+               </c:list-property>
+            </results>
+         </operation>
+         <operation name="listDurableSubscriptions,result=SubscriptionInfo" displayName="list all durable subscriptions"
+                    description="Lists all the durable subscriptions for this topic.">
+            <results>
+               <c:list-property name="result">
+                  <c:map-property required="false" name="element">
+                     <c:simple-property type="string" name="name"/>
+                     <c:simple-property type="string" required="false" name="clientID"/>
+                     <c:simple-property type="string" required="false" name="subName"/>
+                     <c:simple-property type="boolean" required="false" name="durable"/>
+                     <c:simple-property type="integer" name="messageCount"/>
+                     <c:simple-property type="string" name="filter"/>
+                  </c:map-property>
+               </c:list-property>
+            </results>
+         </operation>
+         <operation name="listNonDurableSubscriptions,result=SubscriptionInfo"
+                    displayName="list all non durable subscriptions"
+                    description="Lists all the non-durable subscriptions for this topic.">
+            <results>
+               <c:list-property name="result">
+                  <c:map-property required="false" name="element">
+                     <c:simple-property type="string" name="name"/>
+                     <c:simple-property type="string" required="false" name="clientID"/>
+                     <c:simple-property type="string" required="false" name="subName"/>
+                     <c:simple-property type="boolean" required="false" name="durable"/>
+                     <c:simple-property type="integer" name="messageCount"/>
+                     <c:simple-property type="string" name="filter"/>
+                  </c:map-property>
+               </c:list-property>
+            </results>
+         </operation>
+         <operation name="listMessagesForSubscription,result=JMSMessage" displayName="list all the messages"
+                    description="list all the messages.">
+            <parameters>
+               <c:simple-property required="true" name="queueName"
+                                  displayName="the name of the queue representing a subscription"/>
+            </parameters>
+            <results>
+               <c:list-property name="result">
+                  <c:map-property required="false" name="element">
+                     <c:simple-property type="string" name="JMSMessageID"/>
+                     <c:simple-property type="long" required="false" name="JMSTimestamp"/>
+                     <c:simple-property type="long" required="false" name="JMSExpiration"/>
+                     <c:simple-property type="string" required="false" name="JMSDeliveryMode"/>
+                     <c:simple-property type="string" name="JMSMessageID"/>
+                  </c:map-property>
+               </c:list-property>
+            </results>
+         </operation>
+         <operation name="countMessagesForSubscription" displayName="list messages for subscription"
+                    description="Count the number of messages matching the filter for the given subscription.">
+            <parameters>
+               <c:simple-property required="true" name="clientID" displayName="the client ID"/>
+               <c:simple-property required="true" name="subscriptionName"
+                                  displayName="the name of the durable subscription"/>
+               <c:simple-property required="false" name="filter" displayName="a JMS filter (can be empty)"/>
+            </parameters>
+            <results>
+               <c:simple-property name="operationResult" description="Message Subscriptions."/>
+            </results>
+         </operation>
+         <operation name="dropDurableSubscription" displayName="Drop durable subscription"
+                    description="Drop a durable subscription.">
+            <parameters>
+               <c:simple-property required="true" name="clientID" displayName="the client ID"/>
+               <c:simple-property required="true" name="subscriptionName"
+                                  displayName="the name of the durable subscription"/>
+            </parameters>
+         </operation>
+         <operation name="dropAllSubscriptions" displayName="Drop all durable subscriptions"
+                    description="Drop all durable subscription.">
+         </operation>
+         &destinationMetrics;
+         <metric property="getSubscriptionCount"
+                 displayName="Subscription Count"
+                 description="number of (durable and non-durable) subscribers for this topic"
+                 dataType="measurement" displayType="summary"/>
+         <metric property="getDurableSubscriptionCount"
+                 displayName="Durable Subscription Count"
+                 description="number of durable subscribers for this topic"
+                 dataType="measurement" displayType="summary"/>
+         <metric property="getNonDurableSubscriptionCount"
+                 displayName="Non Durable Subscription Count"
+                 description="number of non-durable subscribers for this topic"
+                 dataType="measurement" displayType="summary"/>
+         <metric property="getDurableMessageCount"
+                 displayName="Durable Message Count"
+                 description="number of messages for all durable subscribers for this topic"
+                 dataType="measurement" displayType="summary"/>
+         <metric property="getNonDurableMessageCount"
+                 displayName="Non Durable Message Count"
+                 description="number of messages for all non-durable subscribers for this topic"
+                 dataType="measurement" displayType="summary"/>
+         <resource-configuration>
+            <c:group name="HornetQCustomProperties" displayName="Destination Options">
+               <c:simple-property name="name" displayName="The Queues Name" required="true" readOnly="true">
+                  <c:description>The Name of the queue to deploy</c:description>
+               </c:simple-property>
+               <c:simple-property name="jndiBindings" displayName="The Queues JNDI Name" required="true" readOnly="true">
+                  <c:description>The JNDI Name of the queue to deploy</c:description>
+               </c:simple-property>
+               <c:simple-property name="dla" displayName="Dead Letter Address" required="false">
+                  <c:description>The Address to route dead messages to</c:description>
+               </c:simple-property>
+               <c:simple-property name="expiryAddress" displayName="Expiry Address" required="false">
+                  <c:description>The Address to route dead messages to</c:description>
+               </c:simple-property>
+               <c:simple-property name="maxSize" default="10485760" type="integer" displayName="Max Size of Address"
+                                  required="true">
+                  <c:description>The maximum size in bytes an address can hold</c:description>
+               </c:simple-property>
+               <c:simple-property name="pageSize" default="10485760" type="integer" displayName="Page Size"
+                                  required="true">
+                  <c:description>The point at which messages will be paged on an Address</c:description>
+               </c:simple-property>
+               <c:simple-property name="maxDeliveryAttempts" type="integer" default="10"
+                                  displayName="Max Delivery Attempts" required="true">
+                  <c:description>The maximum time to attempt delivery to this Address</c:description>
+               </c:simple-property>
+               <c:simple-property name="redeliveryDelay" type="long" default="0" displayName="Redelivery Delay"
+                                  required="true">
+                  <c:description>The delay before re routing a message to this Address</c:description>
+               </c:simple-property>
+               <c:simple-property name="lastValueQueue" default="false" type="boolean" displayName="Last Value Queue"
+                                  required="true">
+                  <c:description>Is this queue a last value queue</c:description>
+               </c:simple-property>
+               <c:simple-property name="redistributionDelay" default="-1" type="long" displayName="Redistribution Delay"
+                                  required="true">
+                  <c:description>How long to wait before redistributing messages to another node when clustered
+                  </c:description>
+               </c:simple-property>
+               <c:simple-property name="sendToDLAOnNoRoute" default="false" type="boolean"
+                                  displayName="Send To DLA on no route" required="true">
+                  <c:description>Whether or not messages routed to this address gets sent to DLA when no consumers are
+                     available
+                  </c:description>
+               </c:simple-property>
+               <c:simple-property name="addressFullMessagePolicy" default="PAGE" type="string"
+                                  displayName="Address Full Message Policy" required="true">
+                  <c:description>The policy to use when this Address is full (PAGE,DROP,BLOCK)</c:description>
+               </c:simple-property>
+               <c:list-property name="securityConfig"
+                                displayName="Security Configurations"
+                                description="This element specifies a XML fragment which describes the access control list to be used by the SecurityManager to authorize client operations against the destination. The content model is the same as for the SecurityManager SecurityConf attribute.">
+                  <c:map-property name="role"
+                                  displayName="Security Configuration Attributes"
+                                  description="These are the attributes that define the role name, and if the role is allowed to read, write or create Messages on this Queue">
+                     <c:simple-property name="name"
+                                        displayName="Read"
+                                        description="The name of the role?"
+                                        summary="true"
+                                        required="true"
+                                        type="string"/>
+                     <c:simple-property name="send"
+                                        displayName="Read"
+                                        description="Is this role allowed to write messages to this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                     <c:simple-property name="consume"
+                                        displayName="Write"
+                                        description="Is this role allowed to read messages from this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                  </c:map-property>
+
+               </c:list-property>
+            </c:group>
+         </resource-configuration>
+      </service>
+      <service name="JMS Connection Factory"
+               discovery="JMSConnectionFactoryDiscoveryComponent"
+               class="JMSConnectionFactoryComponent"
+               createDeletePolicy="both">
+         <metric property="getName"
+                 displayName="Name"
+                 description="name of this queue"
+                 dataType="trait" displayType="summary"/>
+         <metric property="getBindings"
+                 displayName="JNDI Binding"
+                 description="JNDI Binding of this queue"
+                 dataType="trait" displayType="summary"/>
+         <metric property="getStaticConnectors"
+                 displayName="Static Connectors"
+                 description="the connection factory connectors"
+                 dataType="trait" displayType="summary"/>
+         <resource-configuration>
+            <c:group name="HornetQCustomProperties" displayName="Destination Options">
+               <c:simple-property name="name" displayName="The Queues Name" required="true" readOnly="true">
+                  <c:description>The Name of the queue to deploy</c:description>
+               </c:simple-property>
+               <c:simple-property name="Bindings" displayName="The Queues JNDI Name" required="true" readOnly="true">
+                  <c:description>The JNDI Name of the queue to deploy</c:description>
+               </c:simple-property>
+               <c:simple-property name="DiscoveryAddress" required="false" displayName="Discovery Address"/>
+               <c:simple-property name="DiscoveryPort" type="integer" displayName="Discovery Port"/>
+               <c:simple-property name="DiscoveryRefreshTimeout" type="long" displayName="Discovery Refresh Timeout"/>
+               <c:simple-property name="DiscoveryInitialWaitTimeout" type="long" displayName="Discovery Initial Wait Timeout"/>
+               <c:simple-property name="ClientID" required="false" displayName="Client ID"/>
+               <c:simple-property name="DupsOKBatchSize" type="integer" displayName="Dups OK Batch Size"/>
+               <c:simple-property name="TransactionBatchSize" type="integer" displayName="Transaction Batch Size"/>
+               <c:simple-property name="ClientFailureCheckPeriod" type="long" displayName="Client Failure Check Period"/>
+               <c:simple-property name="ConnectionTTL" type="long" displayName="Connection TTL"/>
+               <c:simple-property name="CallTimeout" type="long" displayName="Call Timeout"/>
+               <c:simple-property name="ConsumerWindowSize" type="integer" displayName="Consumer Window Size"/>
+               <c:simple-property name="ConsumerMaxRate" type="integer" displayName="Consumer Max Rate"/>
+               <c:simple-property name="ConfirmationWindowSize" type="integer" displayName="Confirmation Window Size"/>
+               <c:simple-property name="ProducerMaxRate" type="integer" displayName="Producer Max Rate"/>
+               <c:simple-property name="ProducerWindowSize" type="integer" displayName="Producer Window Size"/>
+               <c:simple-property name="CacheLargeMessagesClient" type="boolean" displayName="Cache Large Messages Client"/>
+               <c:simple-property name="MinLargeMessageSize" type="integer" displayName="Min Large Message Size"/>
+               <c:simple-property name="BlockOnNonDurableSend" type="boolean" displayName="Block On Non Durable Send"/>
+               <c:simple-property name="BlockOnAcknowledge" type="boolean" displayName="Block On Acknowledge"/>
+               <c:simple-property name="BlockOnDurableSend" type="boolean" displayName="Block On Durable Send"/>
+               <c:simple-property name="AutoGroup" type="boolean" displayName="Auto Group"/>
+               <c:simple-property name="PreAcknowledge" type="boolean" displayName="Pre Acknowledge"/>
+               <c:simple-property name="MaxRetryInterval" type="long" displayName="Max Retry Interval"/>
+               <c:simple-property name="RetryIntervalMultiplier" type="double" displayName="Retry Interval Multiplier"/>
+               <c:simple-property name="ReconnectAttempts" type="integer" displayName="Reconnect Attempts"/>
+               <c:simple-property name="FailoverOnServerShutdown" type="boolean" displayName="Failover On Server Shutdown"/>
+               <c:simple-property name="ScheduledThreadPoolMaxSize" type="integer" displayName="Scheduled Thread Pool Max Size"/>
+               <c:simple-property name="ThreadPoolMaxSize" type="integer" displayName="Thread Pool Max Size"/>
+               <c:simple-property name="GroupID" required="false" displayName="Group ID"/>
+               <c:simple-property name="InitialMessagePacketSize" type="integer" displayName="Initial Message Packet Size"/>
+               <c:simple-property name="UseGlobalPools" type="boolean" displayName="Use Global Pools"/>
+               <c:simple-property name="RetryInterval" type="long" displayName="Retry Interval"/>
+               <c:simple-property name="ConnectionLoadBalancingPolicyClassName" displayName="Connection Load Balancing Policy Class Name"/>
+            </c:group>
+         </resource-configuration>
+      </service>
    </service>
 </plugin>

Modified: trunk/hornetq-int/src/resources/hornetq-deployers-jboss-beans.xml
===================================================================
--- trunk/hornetq-int/src/resources/hornetq-deployers-jboss-beans.xml	2010-03-19 18:43:56 UTC (rev 102634)
+++ trunk/hornetq-int/src/resources/hornetq-deployers-jboss-beans.xml	2010-03-19 19:13:19 UTC (rev 102635)
@@ -12,14 +12,15 @@
          <parameter>hornetq-queues.xml</parameter>
       </constructor>
    </bean>
-   
+
    <bean name="HornetQCoreConfigRealDeployer" class="org.jboss.as.integration.hornetq.deployers.HornetQCoreConfigRealDeployer"/>
 
    <bean name="HornetQJMSParserDeployer" class="org.jboss.as.integration.hornetq.deployers.HornetQJMSParserDeployer">
       <property name="mgtObjectCreator"><inject bean="HornetQManagedObjectCreator" /></property>
+      <property name="buildManagedObject">true</property>
    </bean>
-   
 
+
    <bean name="HornetQJMSRealDeployer" class="org.jboss.as.integration.hornetq.deployers.HornetQJMSRealDeployer">
        <demand>HornetQDestinationCreator</demand>
    </bean>
@@ -46,10 +47,20 @@
       <constructor><parameter><inject bean="ManagedObjectFactory" /></parameter></constructor>
         <demand>HornetQDestinationCreator</demand>
 	</bean>
-	
+
    <bean name="JMSQueueManageMO" class="org.jboss.as.integration.hornetq.management.jms.QueueManageImplMO">
       <constructor><parameter><inject bean="HornetQServer" /></parameter></constructor>
       <demand>JMSServerManager</demand>
    </bean>
 
+   <bean name="JMSTopicManageMO" class="org.jboss.as.integration.hornetq.management.jms.TopicManageMO">
+      <constructor><parameter><inject bean="HornetQServer" /></parameter></constructor>
+      <demand>JMSServerManager</demand>
+   </bean>
+
+   <bean name="JMSConnectionFactoryManageMO" class="org.jboss.as.integration.hornetq.management.jms.ConnectionFactoryManageMO">
+      <constructor><parameter><inject bean="HornetQServer" /></parameter></constructor>
+      <demand>JMSServerManager</demand>
+   </bean>
+
 </deployment>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list