[jboss-cvs] JBossAS SVN: r102862 - in trunk/hornetq-int/src: main/java/org/jboss/as/integration/hornetq/management/jms and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 24 05:07:38 EDT 2010


Author: ataylor
Date: 2010-03-24 05:07:37 -0400 (Wed, 24 Mar 2010)
New Revision: 102862

Modified:
   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/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/JMSQueueComponent2.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/management/jms/AddressSettingsMapper.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/QueueManageImplMO.java
   trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java
   trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml
Log:
updates to hornetq integration management objects and jopr plugin part 2

Modified: 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	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSConnectionFactoryComponent.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -12,9 +12,18 @@
  */
 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.ConfigurationUpdateStatus;
+import org.rhq.core.domain.configuration.PropertySimple;
 import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
 
+import java.util.Map;
+
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
  *         Created Mar 19, 2010
@@ -67,8 +76,126 @@
       return "getMeasurements";
    }
 
+   @Override
+   String getDeleteOperationName()
+   {
+      return "deleteConnectionFactory";
+   }
+
    public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
    {
-      //To change body of implemented methods use File | Settings | File Templates.
+      Map<String, PropertySimple> simpleProps = configurationUpdateReport.getConfiguration().getSimpleProperties();
+      String name = simpleProps.get("name").getStringValue();
+      long discoveryRefreshTimeout = simpleProps.get("DiscoveryRefreshTimeout").getLongValue();
+      String clientId = simpleProps.get("ClientID").getStringValue();
+      int dupsOkBatchSize = simpleProps.get("DupsOKBatchSize").getIntegerValue();
+      int transactionBatchSize = simpleProps.get("TransactionBatchSize").getIntegerValue();
+      long clientFailureCheckPeriod = simpleProps.get("ClientFailureCheckPeriod").getLongValue();
+      long connectionTTL = simpleProps.get("ConnectionTTL").getLongValue();
+      long callTimeout = simpleProps.get("CallTimeout").getLongValue();
+      int consumerWindowSize = simpleProps.get("ConsumerWindowSize").getIntegerValue();
+      int confirmationWindowSize = simpleProps.get("ConfirmationWindowSize").getIntegerValue();
+      int producerMaxRate = simpleProps.get("ProducerMaxRate").getIntegerValue();
+      int producerWindowSize = simpleProps.get("ProducerWindowSize").getIntegerValue();
+      boolean cacheLargeMessageClient = simpleProps.get("CacheLargeMessagesClient").getBooleanValue();
+      int minLargeMessageSize = simpleProps.get("MinLargeMessageSize").getIntegerValue();
+      boolean blockOnNonDurableSend = simpleProps.get("BlockOnNonDurableSend").getBooleanValue();
+      boolean blockOnAcknowledge = simpleProps.get("BlockOnAcknowledge").getBooleanValue();
+      boolean blockOnDurableSend = simpleProps.get("BlockOnDurableSend").getBooleanValue();
+      boolean autoGroup = simpleProps.get("AutoGroup").getBooleanValue();
+      boolean preAcknowledge = simpleProps.get("PreAcknowledge").getBooleanValue();
+      long maxRetryInterval = simpleProps.get("MaxRetryInterval").getLongValue();
+      double retryIntervalMultiplier = simpleProps.get("RetryIntervalMultiplier").getDoubleValue();
+      int reconnectAttempts = simpleProps.get("ReconnectAttempts").getIntegerValue();
+      boolean failoverOnShutdown = simpleProps.get("FailoverOnServerShutdown").getBooleanValue();
+      int scheduledThreadPoolMaxSize = simpleProps.get("ScheduledThreadPoolMaxSize").getIntegerValue();
+      int threadPoolMaxSize = simpleProps.get("ThreadPoolMaxSize").getIntegerValue();
+      String groupId = simpleProps.get("GroupID").getStringValue();
+      int initialMessagePacketSize = simpleProps.get("InitialMessagePacketSize").getIntegerValue();
+      boolean useGlobalPools = simpleProps.get("UseGlobalPools").getBooleanValue();
+      long retryInterval = simpleProps.get("RetryInterval").getLongValue();
+      String connectionLoadBalancingPolicyClassName = simpleProps.get("ConnectionLoadBalancingPolicyClassName").getStringValue();
+
+      try
+      {
+         ManagementView managementView = getProfileService();
+
+         updateConnectionFactory(configurationUpdateReport, managementView, name, discoveryRefreshTimeout, clientId, dupsOkBatchSize, transactionBatchSize, clientFailureCheckPeriod, connectionTTL, callTimeout, consumerWindowSize, confirmationWindowSize, producerMaxRate, producerWindowSize, cacheLargeMessageClient, minLargeMessageSize, blockOnNonDurableSend, blockOnAcknowledge, blockOnDurableSend, autoGroup, preAcknowledge, maxRetryInterval, retryIntervalMultiplier, reconnectAttempts, failoverOnShutdown, scheduledThreadPoolMaxSize, threadPoolMaxSize, groupId, initialMessagePacketSize, useGlobalPools, retryInterval, connectionLoadBalancingPolicyClassName);
+      }
+      catch (Exception e)
+      {
+         e.printStackTrace();
+         configurationUpdateReport.setStatus(ConfigurationUpdateStatus.FAILURE);
+         configurationUpdateReport.setErrorMessage(e.getMessage());
+      }
+
    }
+
+   private void updateConnectionFactory(ConfigurationUpdateReport configurationUpdateReport,
+                                        ManagementView managementView,
+                                        String name,
+                                        long discoveryRefreshTimeout,
+                                        String clientId,
+                                        int dupsOkBatchSize,
+                                        int transactionBatchSize,
+                                        long clientFailureCheckPeriod,
+                                        long connectionTTL,
+                                        long callTimeout,
+                                        int consumerWindowSize,
+                                        int confirmationWindowSize,
+                                        int producerMaxRate,
+                                        int producerWindowSize,
+                                        boolean cacheLargeMessageClient,
+                                        int minLargeMessageSize,
+                                        boolean blockOnNonDurableSend,
+                                        boolean blockOnAcknowledge,
+                                        boolean blockOnDurableSend,
+                                        boolean autoGroup,
+                                        boolean preAcknowledge,
+                                        long maxRetryInterval,
+                                        double retryIntervalMultiplier,
+                                        int reconnectAttempts,
+                                        boolean failoverOnShutdown,
+                                        int scheduledThreadPoolMaxSize,
+                                        int threadPoolMaxSize,
+                                        String groupId,
+                                        int initialMessagePacketSize,
+                                        boolean useGlobalPools,
+                                        long retryInterval,
+                                        String connectionLoadBalancingPolicyClassName) throws Exception
+   {
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSConnectionFactoryManageMO", "updateConnectionFactory", new ComponentType("JMSManage", "ConnectionFactoryManage"));
+      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, discoveryRefreshTimeout),
+            new SimpleValueSupport(SimpleMetaType.STRING, clientId),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, dupsOkBatchSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, transactionBatchSize),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, clientFailureCheckPeriod),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, connectionTTL),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, callTimeout),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, consumerWindowSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, confirmationWindowSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, producerMaxRate),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, producerWindowSize),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, cacheLargeMessageClient),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, minLargeMessageSize),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, blockOnNonDurableSend),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, blockOnAcknowledge),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, blockOnDurableSend),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, autoGroup),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, preAcknowledge),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, maxRetryInterval),
+            new SimpleValueSupport(SimpleMetaType.DOUBLE_PRIMITIVE, retryIntervalMultiplier),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, reconnectAttempts),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, failoverOnShutdown),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, scheduledThreadPoolMaxSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, threadPoolMaxSize),
+            new SimpleValueSupport(SimpleMetaType.STRING, groupId),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, initialMessagePacketSize),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, useGlobalPools),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, retryInterval),
+            new SimpleValueSupport(SimpleMetaType.STRING, connectionLoadBalancingPolicyClassName));
+
+      configurationUpdateReport.setStatus(ConfigurationUpdateStatus.SUCCESS);
+   }
 }

Modified: 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	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSDestinationComponent.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -37,6 +37,8 @@
 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.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
 import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
 import org.rhq.core.pluginapi.inventory.ResourceComponent;
 import org.rhq.core.pluginapi.inventory.ResourceContext;
@@ -53,7 +55,7 @@
  * @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
+public abstract class JMSDestinationComponent implements ResourceComponent, MeasurementFacet, OperationFacet, ConfigurationFacet, JMSComponent, DeleteResourceFacet
 {
    private ResourceContext resourceContext;
    private JMSComponent jmsComponent;
@@ -63,6 +65,20 @@
       return null;
    }
 
+   public void deleteResource() throws Exception
+   {
+      ManagementView view = getProfileService();
+      ManagedOperation operation = ManagementSupport.getOperation(view, getComponentName(), getDeleteOperationName(), getComponentType());
+      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()));
+   }
+
+
+
+   public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> measurementScheduleRequests) throws Exception
    {
       ArrayValueSupport support = new ArrayValueSupport(new ArrayMetaType(SimpleMetaType.STRING, false));
@@ -110,9 +126,34 @@
          String name = definition.getName();
          if (val.containsKey(name))
          {
-            SimpleValueSupport attr = (SimpleValueSupport) val.get(name);
-            PropertySimple simple = new PropertySimple(name, attr.getValue());
-            config.put(simple);
+            MetaValue mv = val.get(name);
+            if(mv instanceof SimpleValueSupport)
+            {
+               SimpleValueSupport attr = (SimpleValueSupport) mv;
+               PropertySimple simple = new PropertySimple(name, attr.getValue());
+               config.put(simple);
+            }
+            else if(mv instanceof CollectionValueSupport)
+            {
+               PropertyList property = new PropertyList("securityConfig");
+               CollectionValueSupport valueSupport = (CollectionValueSupport) mv;
+               MetaValue[] msgs =  valueSupport.getElements();
+               for (MetaValue mv2 : msgs)
+               {
+                  CompositeValueSupport msg = (CompositeValueSupport) mv2;
+                  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()));
+                  }
+               }
+               config.put(property);
+            }
          }
       }
       return config;
@@ -177,6 +218,8 @@
 
    abstract String getMeasurementsOperationName();
 
+   abstract String getDeleteOperationName();
+
    private void populateParams(final Collection<PropertySimple> props, final SimpleValueSupport[] params, final SimpleValueSupport[] signature)
    {
       int pos = 0;

Modified: 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/JMSManagerComponent.java	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSManagerComponent.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -27,17 +27,21 @@
 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.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
 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.List;
 import java.util.Map;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- * Created 11-Mar-2010
+ *         Created 11-Mar-2010
  */
 public class JMSManagerComponent implements ResourceComponent, CreateChildResourceFacet, JMSComponent
 {
@@ -60,36 +64,76 @@
       }
       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"));
+         if ("JMS Connection Factory".equalsIgnoreCase(createResourceReport.getResourceType().getName()))
+         {
 
-         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);
+            String name = simpleProps.get("name").getStringValue();
+            String liveTransportClassNames = simpleProps.get("liveTransportClassNames").getStringValue();
+            String liveTransportParams = simpleProps.get("liveTransportParams").getStringValue();
+            String backupTransportClassNames = simpleProps.get("backupTransportClassNames").getStringValue();
+            String backupTransportParams = simpleProps.get("backupTransportParams").getStringValue();
+            String bindings = simpleProps.get("Bindings").getStringValue();
+            String discoveryAddress = simpleProps.get("DiscoveryAddress").getStringValue();
+            int discoveryPort = simpleProps.get("DiscoveryPort").getIntegerValue();
+            long discoveryRefreshTimeout = simpleProps.get("DiscoveryRefreshTimeout").getLongValue();
+            String clientId = simpleProps.get("ClientID").getStringValue();
+            int dupsOkBatchSize = simpleProps.get("DupsOKBatchSize").getIntegerValue();
+            int transactionBatchSize = simpleProps.get("TransactionBatchSize").getIntegerValue();
+            long clientFailureCheckPeriod = simpleProps.get("ClientFailureCheckPeriod").getLongValue();
+            long connectionTTL = simpleProps.get("ConnectionTTL").getLongValue();
+            long callTimeout = simpleProps.get("CallTimeout").getLongValue();
+            int consumerWindowSize = simpleProps.get("ConsumerWindowSize").getIntegerValue();
+            int confirmationWindowSize = simpleProps.get("ConfirmationWindowSize").getIntegerValue();
+            int producerMaxRate = simpleProps.get("ProducerMaxRate").getIntegerValue();
+            int producerWindowSize = simpleProps.get("ProducerWindowSize").getIntegerValue();
+            boolean cacheLargeMessageClient = simpleProps.get("CacheLargeMessagesClient").getBooleanValue();
+            int minLargeMessageSize = simpleProps.get("MinLargeMessageSize").getIntegerValue();
+            boolean blockOnNonDurableSend = simpleProps.get("BlockOnNonDurableSend").getBooleanValue();
+            boolean blockOnAcknowledge = simpleProps.get("BlockOnAcknowledge").getBooleanValue();
+            boolean blockOnDurableSend = simpleProps.get("BlockOnDurableSend").getBooleanValue();
+            boolean autoGroup = simpleProps.get("AutoGroup").getBooleanValue();
+            boolean preAcknowledge = simpleProps.get("PreAcknowledge").getBooleanValue();
+            long maxRetryInterval = simpleProps.get("MaxRetryInterval").getLongValue();
+            double retryIntervalMultiplier = simpleProps.get("RetryIntervalMultiplier").getDoubleValue();
+            int reconnectAttempts = simpleProps.get("ReconnectAttempts").getIntegerValue();
+            boolean failoverOnShutdown = simpleProps.get("FailoverOnServerShutdown").getBooleanValue();
+            int scheduledThreadPoolMaxSize = simpleProps.get("ScheduledThreadPoolMaxSize").getIntegerValue();
+            int threadPoolMaxSize = simpleProps.get("ThreadPoolMaxSize").getIntegerValue();
+            String groupId = simpleProps.get("GroupID").getStringValue();
+            int initialMessagePacketSize = simpleProps.get("InitialMessagePacketSize").getIntegerValue();
+            boolean useGlobalPools = simpleProps.get("UseGlobalPools").getBooleanValue();
+            long retryInterval = simpleProps.get("RetryInterval").getLongValue();
+            String connectionLoadBalancingPolicyClassName = simpleProps.get("ConnectionLoadBalancingPolicyClassName").getStringValue();
+            createConnectionFactory(createResourceReport, managementView, name,liveTransportClassNames, liveTransportParams, backupTransportClassNames, backupTransportParams, bindings, discoveryAddress, discoveryPort, discoveryRefreshTimeout, clientId, dupsOkBatchSize, transactionBatchSize, clientFailureCheckPeriod, connectionTTL, callTimeout, consumerWindowSize, confirmationWindowSize, producerMaxRate, producerWindowSize, cacheLargeMessageClient, minLargeMessageSize, blockOnNonDurableSend, blockOnAcknowledge, blockOnDurableSend, autoGroup, preAcknowledge, maxRetryInterval, retryIntervalMultiplier, reconnectAttempts, failoverOnShutdown, scheduledThreadPoolMaxSize, threadPoolMaxSize, groupId, initialMessagePacketSize, useGlobalPools, retryInterval, connectionLoadBalancingPolicyClassName);
+         }
+         else
+         {
+            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();
+            if ("JMS Queue".equalsIgnoreCase(createResourceReport.getResourceType().getName()))
+            {
+               createQueue(createResourceReport, managementView, name, jndiName, DLA, expiryAddress, maxSize, pageSize, maxDeliveryAttempts, redeliveryDelay, lastValueQueue, redistributionDelay, sendToDLAOnNoRoute, addressFullMessagePolicy);
+            }
+            else if ("JMS Topic".equalsIgnoreCase(createResourceReport.getResourceType().getName()))
+            {
+               createTopic(createResourceReport, managementView, name, jndiName, DLA, expiryAddress, maxSize, pageSize, maxDeliveryAttempts, redeliveryDelay, lastValueQueue, redistributionDelay, sendToDLAOnNoRoute, addressFullMessagePolicy);
+            }
+         }
 
+
       }
       catch (Exception e)
       {
@@ -100,7 +144,118 @@
       return createResourceReport;
    }
 
+   private void createConnectionFactory(CreateResourceReport createResourceReport, ManagementView managementView, String name,String liveTransportClassNames, String liveTransportParams, String backupTransportClassNames, String backupTransportParams,  String bindings, String discoveryAddress, int discoveryPort, long discoveryRefreshTimeout, String clientId, int dupsOkBatchSize, int transactionBatchSize, long clientFailureCheckPeriod, long connectionTTL, long callTimeout, int consumerWindowSize, int confirmationWindowSize, int producerMaxRate, int producerWindowSize, boolean cacheLargeMessageClient, int minLargeMessageSize, boolean blockOnNonDurableSend, boolean blockOnAcknowledge, boolean blockOnDurableSend, boolean autoGroup, boolean preAcknowledge, long maxRetryInterval, double retryIntervalMultiplier, int reconnectAttempts, boolean failoverOnShutdown, int scheduledThreadPoolMaxSize, int threadPoolMaxSize, String groupId, int initialMessagePacketSize, boolean useGlobalPool!
 s, long retryInterval, String connectionLoadBalancingPolicyClassName)
+         throws Exception
+   {
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSConnectionFactoryManageMO", "createConnectionFactory", new ComponentType("JMSManage", "ConnectionFactoryManage"));
+      operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
+            new SimpleValueSupport(SimpleMetaType.STRING, liveTransportClassNames),
+            new SimpleValueSupport(SimpleMetaType.STRING, liveTransportParams),
+            new SimpleValueSupport(SimpleMetaType.STRING, backupTransportClassNames),
+            new SimpleValueSupport(SimpleMetaType.STRING, backupTransportParams),
+            new SimpleValueSupport(SimpleMetaType.STRING, bindings),
+            new SimpleValueSupport(SimpleMetaType.STRING, discoveryAddress),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, discoveryPort),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, discoveryRefreshTimeout),
+            new SimpleValueSupport(SimpleMetaType.STRING, clientId),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, dupsOkBatchSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, transactionBatchSize),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, clientFailureCheckPeriod),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, connectionTTL),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, callTimeout),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, consumerWindowSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, confirmationWindowSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, producerMaxRate),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, producerWindowSize),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, cacheLargeMessageClient),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, minLargeMessageSize),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, blockOnNonDurableSend),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, blockOnAcknowledge),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, blockOnDurableSend),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, autoGroup),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, preAcknowledge),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, maxRetryInterval),
+            new SimpleValueSupport(SimpleMetaType.DOUBLE_PRIMITIVE, retryIntervalMultiplier),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, reconnectAttempts),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, failoverOnShutdown),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, scheduledThreadPoolMaxSize),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, threadPoolMaxSize),
+            new SimpleValueSupport(SimpleMetaType.STRING, groupId),
+            new SimpleValueSupport(SimpleMetaType.INTEGER_PRIMITIVE, initialMessagePacketSize),
+            new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, useGlobalPools),
+            new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, retryInterval),
+            new SimpleValueSupport(SimpleMetaType.STRING, connectionLoadBalancingPolicyClassName));
 
+      createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
+      createResourceReport.setResourceKey(name);
+      createResourceReport.setResourceName(name);
+   }
+
+   private void createQueue(CreateResourceReport createResourceReport, ManagementView managementView, String name, String jndiName, String DLA, String expiryAddress, int maxSize, int pageSize, int maxDeliveryAttempts, long redeliveryDelay, boolean lastValueQueue, long redistributionDelay, boolean sendToDLAOnNoRoute, String addressFullMessagePolicy)
+         throws Exception
+   {
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSQueueManageMO", "createQueue", new ComponentType("JMSDestinationManage", "QueueManage"));
+
+      StringBuffer sendRoles = new StringBuffer();
+      StringBuffer consumeRoles = new StringBuffer();
+      createRoles(createResourceReport, name, sendRoles, consumeRoles);
+
+      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),
+            new SimpleValueSupport(SimpleMetaType.STRING, sendRoles.toString()),
+            new SimpleValueSupport(SimpleMetaType.STRING, consumeRoles.toString()));
+      createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
+      createResourceReport.setResourceKey("jms.queue." + name);
+      createResourceReport.setResourceName("jms.queue." + name);
+   }
+
+   private void createTopic(CreateResourceReport createResourceReport, ManagementView managementView, String name, String jndiName, String DLA, String expiryAddress, int maxSize, int pageSize, int maxDeliveryAttempts, long redeliveryDelay, boolean lastValueQueue, long redistributionDelay, boolean sendToDLAOnNoRoute, String addressFullMessagePolicy)
+         throws Exception
+   {
+      ManagedOperation operation = ManagementSupport.getOperation(managementView, "JMSTopicManageMO", "createTopic", new ComponentType("JMSDestinationManage", "TopicManage"));
+
+      StringBuffer sendRoles = new StringBuffer();
+      StringBuffer consumeRoles = new StringBuffer();
+      StringBuffer createNonDurableRoles = new StringBuffer();
+      StringBuffer deleteNonDurableRoles = new StringBuffer();
+      StringBuffer createDurableRoles = new StringBuffer();
+      StringBuffer deleteDurableRoles = new StringBuffer();
+      createRoles(createResourceReport, name, sendRoles, consumeRoles, createNonDurableRoles, deleteNonDurableRoles, createDurableRoles, deleteDurableRoles);
+
+      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),
+            new SimpleValueSupport(SimpleMetaType.STRING, sendRoles.toString()),
+            new SimpleValueSupport(SimpleMetaType.STRING, consumeRoles.toString()),
+            new SimpleValueSupport(SimpleMetaType.STRING, createDurableRoles.toString()),
+            new SimpleValueSupport(SimpleMetaType.STRING, deleteDurableRoles.toString()),
+            new SimpleValueSupport(SimpleMetaType.STRING, createNonDurableRoles.toString()),
+            new SimpleValueSupport(SimpleMetaType.STRING, deleteNonDurableRoles.toString()));
+      createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
+      createResourceReport.setResourceKey("jms.topic." + name);
+      createResourceReport.setResourceName("jms.topic." + name);
+   }
+
+
    public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
    {
       this.resourceContext = resourceContext;
@@ -124,4 +279,116 @@
       m = conn.getClass().getMethod("getManagementView");
       return (ManagementView) m.invoke(conn);
    }
+
+   private void createRoles(CreateResourceReport configurationUpdateReport, String name, StringBuffer sendRoles, StringBuffer consumeRoles)
+   {
+      PropertyList propertyList = (PropertyList) configurationUpdateReport.getResourceConfiguration().get("securityConfig");
+      List<Property> roles = propertyList.getList();
+      for (Property role : roles)
+      {
+         PropertyMap actRole = (PropertyMap) role;
+         boolean send;
+         boolean consume;
+         PropertySimple simple = (PropertySimple) actRole.get("name");
+         name = simple.getStringValue();
+         simple = (PropertySimple) actRole.get("send");
+         send = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("consume");
+         consume = simple.getBooleanValue();
+         if (send)
+         {
+            if (sendRoles.length() > 0)
+            {
+               sendRoles.append(",");
+            }
+            sendRoles.append(name);
+         }
+         if (consume)
+         {
+            if (consumeRoles.length() > 0)
+            {
+               consumeRoles.append(",");
+            }
+            consumeRoles.append(name);
+         }
+      }
+   }
+
+   private void createRoles(CreateResourceReport configurationUpdateReport, String name, StringBuffer sendRoles, StringBuffer consumeRoles, StringBuffer createNonDurableRoles, StringBuffer deleteNonDurableRoles, StringBuffer createDurableRoles, StringBuffer deleteDurableRoles)
+   {
+      PropertyList propertyList = (PropertyList) configurationUpdateReport.getResourceConfiguration().get("securityConfig");
+      List<Property> roles = propertyList.getList();
+      for (Property role : roles)
+      {
+         PropertyMap actRole = (PropertyMap) role;
+         boolean send;
+         boolean consume;
+         boolean createNonDurableQueue;
+         boolean deleteNonDurableQueue;
+         boolean createDurableQueue;
+         boolean deleteDurableQueue;
+         PropertySimple simple = (PropertySimple) actRole.get("name");
+         name = simple.getStringValue();
+         simple = (PropertySimple) actRole.get("send");
+         send = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("consume");
+         consume = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("createNonDurableQueue");
+         createNonDurableQueue = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("deleteNonDurableQueue");
+         deleteNonDurableQueue = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("createDurableQueue");
+         createDurableQueue = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("deleteDurableQueue");
+         deleteDurableQueue = simple.getBooleanValue();
+         if (send)
+         {
+            if (sendRoles.length() > 0)
+            {
+               sendRoles.append(",");
+            }
+            sendRoles.append(name);
+         }
+         if (consume)
+         {
+            if (consumeRoles.length() > 0)
+            {
+               consumeRoles.append(",");
+            }
+            consumeRoles.append(name);
+         }
+         if (createDurableQueue)
+         {
+            if (createDurableRoles.length() > 0)
+            {
+               createDurableRoles.append(",");
+            }
+            createDurableRoles.append(name);
+         }
+         if (deleteDurableQueue)
+         {
+            if (deleteDurableRoles.length() > 0)
+            {
+               deleteDurableRoles.append(",");
+            }
+            deleteDurableRoles.append(name);
+         }
+         if (createNonDurableQueue)
+         {
+            if (createNonDurableRoles.length() > 0)
+            {
+               createNonDurableRoles.append(",");
+            }
+            createNonDurableRoles.append(name);
+         }
+         if (deleteNonDurableQueue)
+         {
+            if (deleteNonDurableRoles.length() > 0)
+            {
+               deleteNonDurableRoles.append(",");
+            }
+            deleteNonDurableRoles.append(name);
+         }
+      }
+   }
 }

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-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSQueueComponent2.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -107,6 +107,12 @@
       return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
 
+   @Override
+   String getDeleteOperationName()
+   {
+      return "deleteQueue";
+   }
+
    public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
    {
       configurationUpdateReport.setStatus(ConfigurationUpdateStatus.INPROGRESS);
@@ -140,11 +146,11 @@
 
       StringBuffer sendRoles = new StringBuffer();
       StringBuffer consumeRoles = new StringBuffer();
-      name = createRoles(configurationUpdateReport, name, sendRoles, consumeRoles);
+      createRoles(configurationUpdateReport, name, sendRoles, consumeRoles);
       try
       {
          ManagedOperation operation = ManagementSupport.getOperation(view, queueComponentName, "updateQueueConfiguration", queueComponentType);
-         operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, name),
+         operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()),
              new SimpleValueSupport(SimpleMetaType.STRING, jndiName),
              new SimpleValueSupport(SimpleMetaType.STRING, DLA),
              new SimpleValueSupport(SimpleMetaType.STRING, expiryAddress),
@@ -169,14 +175,13 @@
       configurationUpdateReport.setStatus(ConfigurationUpdateStatus.SUCCESS);
    }
 
-   private String createRoles(ConfigurationUpdateReport configurationUpdateReport, String name, StringBuffer sendRoles, StringBuffer consumeRoles)
+   private void createRoles(ConfigurationUpdateReport configurationUpdateReport, String name, StringBuffer sendRoles, StringBuffer consumeRoles)
    {
       PropertyList propertyList = (PropertyList) configurationUpdateReport.getConfiguration().get("securityConfig");
       List<Property> roles = propertyList.getList();
       for (Property role : roles)
       {
          PropertyMap actRole = (PropertyMap) role;
-         String roleName;
          boolean send;
          boolean consume;
          PropertySimple simple = (PropertySimple) actRole.get("name");
@@ -202,7 +207,6 @@
             consumeRoles.append(name);
          }
       }
-      return name;
    }
 
    public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception

Modified: 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	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/jopr/JMSTopicComponent.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -21,16 +21,29 @@
 */
 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.*;
 import org.rhq.core.domain.measurement.AvailabilityType;
 import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
  *         Created: 17-Mar-2010
  */
 public class JMSTopicComponent extends JMSDestinationComponent
 {
+   private ResourceContext resourceContext;
+
    private static ComponentType topicComponentType = new ComponentType("JMSDestinationManage", "TopicManage");
 
    private static String topicComponentName = "JMSTopicManageMO";
@@ -83,10 +96,164 @@
       return "invokeTopicOperationSubscriptionType";
    }
 
+   @Override
+   String getDeleteOperationName()
+   {
+      return "deleteTopic";
+   }
+
    public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
    {
-      //To change body of implemented methods use File | Settings | File Templates.
+      configurationUpdateReport.setStatus(ConfigurationUpdateStatus.INPROGRESS);
+
+      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();
+      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();
+
+
+      StringBuffer sendRoles = new StringBuffer();
+      StringBuffer consumeRoles = new StringBuffer();
+      StringBuffer createNonDurableRoles = new StringBuffer();
+      StringBuffer deleteNonDurableRoles = new StringBuffer();
+      StringBuffer createDurableRoles = new StringBuffer();
+      StringBuffer deleteDurableRoles = new StringBuffer();
+      createRoles(configurationUpdateReport, name, sendRoles, consumeRoles, createNonDurableRoles, deleteNonDurableRoles, createDurableRoles, deleteDurableRoles);
+      try
+      {
+         ManagedOperation operation = ManagementSupport.getOperation(view, topicComponentName, "updateTopicConfiguration", topicComponentType);
+         operation.invoke(new SimpleValueSupport(SimpleMetaType.STRING, resourceContext.getResourceKey()),
+             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),
+             new SimpleValueSupport(SimpleMetaType.STRING, sendRoles.toString()),
+             new SimpleValueSupport(SimpleMetaType.STRING, consumeRoles.toString()),
+             new SimpleValueSupport(SimpleMetaType.STRING, createDurableRoles.toString()),
+             new SimpleValueSupport(SimpleMetaType.STRING, deleteDurableRoles.toString()),
+             new SimpleValueSupport(SimpleMetaType.STRING, createNonDurableRoles.toString()),
+             new SimpleValueSupport(SimpleMetaType.STRING, deleteNonDurableRoles.toString()));
+      }
+      catch (Exception e)
+      {
+         configurationUpdateReport.setStatus(ConfigurationUpdateStatus.FAILURE);
+         configurationUpdateReport.setErrorMessage(e.getMessage());
+         e.printStackTrace();
+         return;
+      }
+      configurationUpdateReport.setStatus(ConfigurationUpdateStatus.SUCCESS);
    }
 
+   private void createRoles(ConfigurationUpdateReport configurationUpdateReport, String name, StringBuffer sendRoles, StringBuffer consumeRoles, StringBuffer createNonDurableRoles, StringBuffer deleteNonDurableRoles, StringBuffer createDurableRoles, StringBuffer deleteDurableRoles)
+   {
+      PropertyList propertyList = (PropertyList) configurationUpdateReport.getConfiguration().get("securityConfig");
+      List<Property> roles = propertyList.getList();
+      for (Property role : roles)
+      {
+         PropertyMap actRole = (PropertyMap) role;
+         boolean send;
+         boolean consume;
+         boolean createNonDurableQueue;
+         boolean deleteNonDurableQueue;
+         boolean createDurableQueue;
+         boolean deleteDurableQueue;
+         PropertySimple simple = (PropertySimple) actRole.get("name");
+         name = simple.getStringValue();
+         simple = (PropertySimple) actRole.get("send");
+         send = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("consume");
+         consume = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("createNonDurableQueue");
+         createNonDurableQueue = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("deleteNonDurableQueue");
+         deleteNonDurableQueue = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("createDurableQueue");
+         createDurableQueue = simple.getBooleanValue();
+         simple = (PropertySimple) actRole.get("deleteDurableQueue");
+         deleteDurableQueue = simple.getBooleanValue();
+         if(send)
+         {
+            if(sendRoles.length() > 0)
+            {
+               sendRoles.append(",");
+            }
+            sendRoles.append(name);
+         }
+         if(consume)
+         {
+            if(consumeRoles.length() > 0)
+            {
+               consumeRoles.append(",");
+            }
+            consumeRoles.append(name);
+         }
+         if(createDurableQueue)
+         {
+            if(createDurableRoles.length() > 0)
+            {
+               createDurableRoles.append(",");
+            }
+            createDurableRoles.append(name);
+         }
+         if(deleteDurableQueue)
+         {
+            if(deleteDurableRoles.length() > 0)
+            {
+               deleteDurableRoles.append(",");
+            }
+            deleteDurableRoles.append(name);
+         }
+         if(createNonDurableQueue)
+         {
+            if(createNonDurableRoles.length() > 0)
+            {
+               createNonDurableRoles.append(",");
+            }
+            createNonDurableRoles.append(name);
+         }
+         if(deleteNonDurableQueue)
+         {
+            if(deleteNonDurableRoles.length() > 0)
+            {
+               deleteNonDurableRoles.append(",");
+            }
+            deleteNonDurableRoles.append(name);
+         }
+      }
+   }
 
+   @Override
+   public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
+   {
+      super.start(resourceContext);
+      this.resourceContext = resourceContext;
+   }
 }

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-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/AddressSettingsMapper.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -21,19 +21,20 @@
 */
 package org.jboss.as.integration.hornetq.management.jms;
 
+import org.hornetq.core.security.Role;
 import org.hornetq.core.settings.impl.AddressSettings;
 import org.hornetq.jms.server.config.JMSQueueConfiguration;
 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.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.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Set;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
@@ -42,9 +43,44 @@
 public class AddressSettingsMapper extends MetaMapper<Object[]>
 {
    public static final CompositeMetaType ADDRESS_SETTINGS_TYPE;
+   public static final CompositeMetaType SECURITY_TYPE;
+   public static final CollectionMetaType TYPE;
 
    static
    {
+      String[] securityNames = {
+         "name",
+            "send",
+            "consume",
+            "createDurableQueue",
+            "deleteDurableQueue",
+            "createNonDurableQueue",
+            "deleteNonDurableQueue",
+            "manage"
+      };
+      String[] securityDescription = {
+         "name",
+            "send",
+            "consume" ,
+            "createDurableQueue",
+            "deleteDurableQueue",
+            "createNonDurableQueue",
+            "deleteNonDurableQueue",
+            "manage"
+      };
+      MetaType[] securityTypes = {
+      SimpleMetaType.STRING,
+      SimpleMetaType.BOOLEAN_PRIMITIVE,
+      SimpleMetaType.BOOLEAN_PRIMITIVE,
+      SimpleMetaType.BOOLEAN_PRIMITIVE,
+      SimpleMetaType.BOOLEAN_PRIMITIVE,
+      SimpleMetaType.BOOLEAN_PRIMITIVE,
+      SimpleMetaType.BOOLEAN_PRIMITIVE,
+      SimpleMetaType.BOOLEAN_PRIMITIVE
+      };
+      SECURITY_TYPE = new ImmutableCompositeMetaType("org.hornetq.core.settings.impl.Role", "Roles", securityNames, securityDescription, securityTypes);
+
+      TYPE = new CollectionMetaType("java.util.List", SECURITY_TYPE);
       String[] itemNames = {
           "name",
           "jndiBindings",
@@ -57,7 +93,8 @@
           "lastValueQueue",
           "redistributionDelay",
           "sendToDLAOnNoRoute",
-          "addressFullMessagePolicy"
+          "addressFullMessagePolicy",
+          "securityConfig"
       };
       String[] itemDescriptions = {
           "name",
@@ -71,7 +108,8 @@
           "lastValueQueue",
           "redistributionDelay",
           "sendToDLAOnNoRoute",
-          "addressFullMessagePolicy"
+          "addressFullMessagePolicy",
+          "securityConfig"
       };
       MetaType[] itemTypes = {
           SimpleMetaType.STRING,
@@ -85,7 +123,8 @@
           SimpleMetaType.BOOLEAN_PRIMITIVE,
           SimpleMetaType.LONG_PRIMITIVE,
           SimpleMetaType.BOOLEAN_PRIMITIVE,
-          SimpleMetaType.STRING
+          SimpleMetaType.STRING,
+          TYPE
       };
       ADDRESS_SETTINGS_TYPE = new ImmutableCompositeMetaType("org.hornetq.core.settings.impl.AddressSettings", "Address Settings",
           itemNames, itemDescriptions, itemTypes);
@@ -118,6 +157,28 @@
       cvs.set("redistributionDelay", new SimpleValueSupport(SimpleMetaType.LONG_PRIMITIVE, addressSettings.getRedistributionDelay()));
       cvs.set("sendToDLAOnNoRoute", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, addressSettings.isSendToDLAOnNoRoute()));
       cvs.set("addressFullMessagePolicy", new SimpleValueSupport(SimpleMetaType.STRING, addressSettings.getAddressFullMessagePolicy()));
+      if(val.length == 3)
+      {
+         ArrayList<MetaValue> tmp = new ArrayList<MetaValue>();
+         Set<Role> roleSet = (Set<Role>) val[2];
+         for (Role role : roleSet)
+         {
+            CompositeValueSupport cvs2 = new CompositeValueSupport(SECURITY_TYPE);
+            cvs2.set("name", new SimpleValueSupport(SimpleMetaType.STRING, role.getName()));
+            cvs2.set("send", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isSend()));
+            cvs2.set("consume", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isConsume()));
+            cvs2.set("createDurableQueue", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isCreateDurableQueue()));
+            cvs2.set("deleteDurableQueue", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isDeleteDurableQueue()));
+            cvs2.set("createNonDurableQueue", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isCreateNonDurableQueue()));
+            cvs2.set("deleteNonDurableQueue", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isDeleteNonDurableQueue()));
+            cvs2.set("manage", new SimpleValueSupport(SimpleMetaType.BOOLEAN_PRIMITIVE, role.isManage()));
+            tmp.add(cvs2);
+         }
+         MetaValue[] elements = new MetaValue[tmp.size()];
+         tmp.toArray(elements);
+         CollectionValueSupport sec = new CollectionValueSupport(TYPE, elements);
+         cvs.set("securityConfig", sec);
+      }
       return cvs;
    }
 

Modified: 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	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -55,6 +55,14 @@
       jmsServerControl = (JMSServerControl) managementService.getResource(ResourceNames.JMS_SERVER);
    }
 
+   @ManagementOperation(name = "deleteConnectionFactory", description = "returns the JMS Connection Factory configuration",
+       params = {@ManagementParameter(name = "name", description = "the connection factory name")})
+   public void deleteConnectionFactory(String name) throws Exception
+   {
+      jmsServerControl.destroyConnectionFactory(name);
+      jmsServerControl.removeSecuritySettings(name);
+   }
+
    @ManagementOperation(name = "getConfiguration", description = "returns the JMS Connection Factory configuration",
        params = {@ManagementParameter(name = "name", description = "the connection factory name")})
    @MetaMapping(value = ConnectionFactoryMapper.class)
@@ -83,4 +91,218 @@
       return jmsServerControl.getConnectionFactoryNames();
    }
 
+   @ManagementOperation(name = "createConnectionFactory", description = "creates a connection factories",
+       params = {
+           @ManagementParameter(name = "name", description = "the connection factory name"),
+           @ManagementParameter(name = "liveTransportClassNames", description = "comma-separated list of class names for transport to live servers"),
+           @ManagementParameter(name = "liveTransportParams", description = "comma-separated list of key=value parameters for the live transports (enclosed between { } for each transport)"),
+           @ManagementParameter(name = "backupTransportClassNames", description = "comma-separated list of class names for transport to backup servers"),
+           @ManagementParameter(name = "backupTransportParams", description = "comma-separated list of key=value parameters for the backup transports (enclosed between { } for each transport)"),
+           @ManagementParameter(name = "bindings", description = "comma-separated list of JNDI bindings"),
+           @ManagementParameter(name = "discoveryAddress", description = "a discovery address"),
+           @ManagementParameter(name = "discoveryPort", description = "a discovery port"),
+           @ManagementParameter(name = "discoveryRefreshTimeout", description = "the discovery refresh timeout"),
+           @ManagementParameter(name = "clientId", description = "the client id"),
+           @ManagementParameter(name = "dupsOkBatchSize", description = "the batch size for DUPS_OK acknowledge mode"),
+           @ManagementParameter(name = "transactionBatchSize", description = "the transaction batch size"),
+           @ManagementParameter(name = "clientFailureCheckPeriod", description = "the client failure check period"),
+           @ManagementParameter(name = "connectionTTL", description = "the connection time to live"),
+           @ManagementParameter(name = "callTimeout", description = "the remote call timeout"),
+           @ManagementParameter(name = "consumerWindowSize", description = "the consumer window size"),
+           @ManagementParameter(name = "confirmationWindowSize", description = "the confirmation window size"),
+           @ManagementParameter(name = "producerMaxRate", description = "the produxer max rate"),
+           @ManagementParameter(name = "producerWindowSize", description = "the producer window size"),
+           @ManagementParameter(name = "cacheLargeMessageClient", description = "do we cache large messages on the client"),
+           @ManagementParameter(name = "minLargeMessageSize", description = "the minimum large message size"),
+           @ManagementParameter(name = "blockOnNonDurableSend", description = "do we block on non durable send"),
+           @ManagementParameter(name = "blockOnAcknowledge", description = "do we block on acknowledge"),
+           @ManagementParameter(name = "blockOnDurableSend", description = "do we block on durable send"),
+           @ManagementParameter(name = "autoGroup", description = "do we use autogroup"),
+           @ManagementParameter(name = "preAcknowledge", description = "do we pre acknowledge messages"),
+           @ManagementParameter(name = "maxRetryInterval", description = "the max retry interval"),
+           @ManagementParameter(name = "retryIntervalMultiplier", description = "the max retry interval multiplier"),
+           @ManagementParameter(name = "reconnectAttempts", description = "the reconnect attempts"),
+           @ManagementParameter(name = "failoverOnShutdown", description = "do we failover on a clean shutdown"),
+           @ManagementParameter(name = "scheduledThreadPoolMaxSize", description = "the pool size for scheduled threads"),
+           @ManagementParameter(name = "threadPoolMaxSize", description = "the pool size for threads"),
+           @ManagementParameter(name = "groupId", description = "the group id"),
+           @ManagementParameter(name = "initialMessagePacketSize", description = "the initial message packet size"),
+           @ManagementParameter(name = "useGlobalPools", description = "do we use global pools"),
+           @ManagementParameter(name = "retryInterval", description = "the retry interval"),
+           @ManagementParameter(name = "connectionLoadBalancingPolicyClassName", description = "the load balancing class")})
+   public void createConnectionFactory(String name,
+                                        final String liveTransportClassNames,
+                                        final String liveTransportParams,
+                                        final String backupTransportClassNames,
+                                        final String backupTransportParams, 
+                                        String bindings,
+                                        String discoveryAddress,
+                                        int discoveryPort,
+                                        long discoveryRefreshTimeout,
+                                        String clientId,
+                                        int dupsOkBatchSize,
+                                        int transactionBatchSize,
+                                        long clientFailureCheckPeriod,
+                                        long connectionTTL,
+                                        long callTimeout,
+                                        int consumerWindowSize,
+                                        int confirmationWindowSize,
+                                        int producerMaxRate,
+                                        int producerWindowSize,
+                                        boolean cacheLargeMessageClient,
+                                        int minLargeMessageSize,
+                                        boolean blockOnNonDurableSend,
+                                        boolean blockOnAcknowledge,
+                                        boolean blockOnDurableSend,
+                                        boolean autoGroup,
+                                        boolean preAcknowledge,
+                                        long maxRetryInterval,
+                                        double retryIntervalMultiplier,
+                                        int reconnectAttempts,
+                                        boolean failoverOnShutdown,
+                                        int scheduledThreadPoolMaxSize,
+                                        int threadPoolMaxSize,
+                                        String groupId,
+                                        int initialMessagePacketSize,
+                                        boolean useGlobalPools,
+                                        long retryInterval,
+                                        String connectionLoadBalancingPolicyClassName)
+         throws Exception
+   {
+      if(liveTransportClassNames != null)
+      {
+         jmsServerControl.createConnectionFactory(name, liveTransportClassNames, liveTransportParams == null?"":liveTransportParams,
+               backupTransportClassNames == null?"":backupTransportClassNames, backupTransportParams == null?"":backupTransportParams, bindings);
+      }
+      else
+      {
+         jmsServerControl.createConnectionFactory(name, discoveryAddress, discoveryPort, bindings);
+      }
+      ConnectionFactoryControl control = (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
+      control.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+      control.setClientID(clientId);
+      control.setDupsOKBatchSize(dupsOkBatchSize);
+      control.setTransactionBatchSize(transactionBatchSize);
+      control.setClientFailureCheckPeriod(clientFailureCheckPeriod);
+      control.setConnectionTTL(connectionTTL);
+      control.setCallTimeout(callTimeout);
+      control.setConsumerWindowSize(consumerWindowSize);
+      control.setConfirmationWindowSize(confirmationWindowSize);
+      control.setProducerMaxRate(producerMaxRate);
+      control.setProducerWindowSize(producerWindowSize);
+      control.setCacheLargeMessagesClient(cacheLargeMessageClient);
+      control.setMinLargeMessageSize(minLargeMessageSize);
+      control.setBlockOnDurableSend(blockOnNonDurableSend);
+      control.setBlockOnAcknowledge(blockOnAcknowledge);
+      control.setBlockOnDurableSend(blockOnDurableSend);
+      control.setAutoGroup(autoGroup);
+      control.setPreAcknowledge(preAcknowledge);
+      control.setMaxRetryInterval(maxRetryInterval);
+      control.setRetryIntervalMultiplier(retryIntervalMultiplier);
+      control.setReconnectAttempts(reconnectAttempts);
+      control.setFailoverOnServerShutdown(failoverOnShutdown);
+      control.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
+      control.setThreadPoolMaxSize(threadPoolMaxSize);
+      control.setGroupID(groupId);
+      control.setInitialMessagePacketSize(initialMessagePacketSize);
+      control.setUseGlobalPools(useGlobalPools);
+      control.setRetryInterval(retryInterval);
+      control.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
+   }
+
+   @ManagementOperation(name = "createConnectionFactory", description = "creates a connection factories",
+       params = {
+           @ManagementParameter(name = "name", description = "the connection factory name"),
+           @ManagementParameter(name = "discoveryRefreshTimeout", description = "the discovery refresh timeout"),
+           @ManagementParameter(name = "clientId", description = "the client id"),
+           @ManagementParameter(name = "dupsOkBatchSize", description = "the batch size for DUPS_OK acknowledge mode"),
+           @ManagementParameter(name = "transactionBatchSize", description = "the transaction batch size"),
+           @ManagementParameter(name = "clientFailureCheckPeriod", description = "the client failure check period"),
+           @ManagementParameter(name = "connectionTTL", description = "the connection time to live"),
+           @ManagementParameter(name = "callTimeout", description = "the remote call timeout"),
+           @ManagementParameter(name = "consumerWindowSize", description = "the consumer window size"),
+           @ManagementParameter(name = "confirmationWindowSize", description = "the confirmation window size"),
+           @ManagementParameter(name = "producerMaxRate", description = "the produxer max rate"),
+           @ManagementParameter(name = "producerWindowSize", description = "the producer window size"),
+           @ManagementParameter(name = "cacheLargeMessageClient", description = "do we cache large messages on the client"),
+           @ManagementParameter(name = "minLargeMessageSize", description = "the minimum large message size"),
+           @ManagementParameter(name = "blockOnNonDurableSend", description = "do we block on non durable send"),
+           @ManagementParameter(name = "blockOnAcknowledge", description = "do we block on acknowledge"),
+           @ManagementParameter(name = "blockOnDurableSend", description = "do we block on durable send"),
+           @ManagementParameter(name = "autoGroup", description = "do we use autogroup"),
+           @ManagementParameter(name = "preAcknowledge", description = "do we pre acknowledge messages"),
+           @ManagementParameter(name = "maxRetryInterval", description = "the max retry interval"),
+           @ManagementParameter(name = "retryIntervalMultiplier", description = "the max retry interval multiplier"),
+           @ManagementParameter(name = "reconnectAttempts", description = "the reconnect attempts"),
+           @ManagementParameter(name = "failoverOnShutdown", description = "do we failover on a clean shutdown"),
+           @ManagementParameter(name = "scheduledThreadPoolMaxSize", description = "the pool size for scheduled threads"),
+           @ManagementParameter(name = "threadPoolMaxSize", description = "the pool size for threads"),
+           @ManagementParameter(name = "groupId", description = "the group id"),
+           @ManagementParameter(name = "initialMessagePacketSize", description = "the initial message packet size"),
+           @ManagementParameter(name = "useGlobalPools", description = "do we use global pools"),
+           @ManagementParameter(name = "retryInterval", description = "the retry interval"),
+           @ManagementParameter(name = "connectionLoadBalancingPolicyClassName", description = "the load balancing class")})
+   public void updateConnectionFactory(String name,
+                                        long discoveryRefreshTimeout,
+                                        String clientId,
+                                        int dupsOkBatchSize,
+                                        int transactionBatchSize,
+                                        long clientFailureCheckPeriod,
+                                        long connectionTTL,
+                                        long callTimeout,
+                                        int consumerWindowSize,
+                                        int confirmationWindowSize,
+                                        int producerMaxRate,
+                                        int producerWindowSize,
+                                        boolean cacheLargeMessageClient,
+                                        int minLargeMessageSize,
+                                        boolean blockOnNonDurableSend,
+                                        boolean blockOnAcknowledge,
+                                        boolean blockOnDurableSend,
+                                        boolean autoGroup,
+                                        boolean preAcknowledge,
+                                        long maxRetryInterval,
+                                        double retryIntervalMultiplier,
+                                        int reconnectAttempts,
+                                        boolean failoverOnShutdown,
+                                        int scheduledThreadPoolMaxSize,
+                                        int threadPoolMaxSize,
+                                        String groupId,
+                                        int initialMessagePacketSize,
+                                        boolean useGlobalPools,
+                                        long retryInterval,
+                                        String connectionLoadBalancingPolicyClassName)
+         throws Exception
+   {
+      ConnectionFactoryControl control = (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
+      control.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+      control.setClientID(clientId);
+      control.setDupsOKBatchSize(dupsOkBatchSize);
+      control.setTransactionBatchSize(transactionBatchSize);
+      control.setClientFailureCheckPeriod(clientFailureCheckPeriod);
+      control.setConnectionTTL(connectionTTL);
+      control.setCallTimeout(callTimeout);
+      control.setConsumerWindowSize(consumerWindowSize);
+      control.setConfirmationWindowSize(confirmationWindowSize);
+      control.setProducerMaxRate(producerMaxRate);
+      control.setProducerWindowSize(producerWindowSize);
+      control.setCacheLargeMessagesClient(cacheLargeMessageClient);
+      control.setMinLargeMessageSize(minLargeMessageSize);
+      control.setBlockOnDurableSend(blockOnNonDurableSend);
+      control.setBlockOnAcknowledge(blockOnAcknowledge);
+      control.setBlockOnDurableSend(blockOnDurableSend);
+      control.setAutoGroup(autoGroup);
+      control.setPreAcknowledge(preAcknowledge);
+      control.setMaxRetryInterval(maxRetryInterval);
+      control.setRetryIntervalMultiplier(retryIntervalMultiplier);
+      control.setReconnectAttempts(reconnectAttempts);
+      control.setFailoverOnServerShutdown(failoverOnShutdown);
+      control.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
+      control.setThreadPoolMaxSize(threadPoolMaxSize);
+      control.setGroupID(groupId);
+      control.setInitialMessagePacketSize(initialMessagePacketSize);
+      control.setUseGlobalPools(useGlobalPools);
+      control.setRetryInterval(retryInterval);
+      control.setConnectionLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName);
+   }
 }

Modified: 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	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -12,6 +12,8 @@
  */
 package org.jboss.as.integration.hornetq.management.jms;
 
+import org.hornetq.api.core.Pair;
+import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.jms.management.ConnectionFactoryControl;
 import org.jboss.metatype.api.types.CompositeMetaType;
 import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
@@ -24,6 +26,7 @@
 
 import java.lang.reflect.Type;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
@@ -32,15 +35,19 @@
 public class ConnectionFactoryMapper extends MetaMapper<ConnectionFactoryControl>
 {
    public static final CompositeMetaType TYPE;
-
    static
    {
       String[] itemNames = {
             "name",
+            "liveTransportClassNames",
+            "liveTransportParams",
+            "backupTransportClassNames",
+            "backupTransportParams",
             "Bindings",
             "DiscoveryAddress",
             "DiscoveryPort",
             "DiscoveryRefreshTimeout",
+            "DiscoveryInitialWaitTimeout",
             "ClientID",
             "DupsOKBatchSize",
             "TransactionBatchSize",
@@ -48,6 +55,7 @@
             "ConnectionTTL",
             "CallTimeout",
             "ConsumerWindowSize",
+            "ConsumerMaxRate",
             "ConfirmationWindowSize",
             "ProducerMaxRate",
             "ProducerWindowSize",
@@ -72,10 +80,15 @@
       };
       String[] itemDescriptions = {
             "name",
+            "liveTransportClassNames",
+            "liveTransportParams",
+            "backupTransportClassNames",
+            "backupTransportParams",
             "Bindings",
             "DiscoveryAddress",
             "DiscoveryPort",
             "DiscoveryRefreshTimeout",
+            "DiscoveryInitialWaitTimeout",
             "ClientID",
             "DupsOKBatchSize",
             "TransactionBatchSize",
@@ -83,6 +96,7 @@
             "ConnectionTTL",
             "CallTimeout",
             "ConsumerWindowSize",
+            "ConsumerMaxRate",
             "ConfirmationWindowSize",
             "ProducerMaxRate",
             "ProducerWindowSize",
@@ -138,6 +152,12 @@
             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",
@@ -149,10 +169,67 @@
    {
       CompositeValueSupport cvs = new CompositeValueSupport(TYPE);
       cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, control.getName()));
+      List<org.hornetq.api.core.Pair<TransportConfiguration, TransportConfiguration>> pairs = control.getStaticConnectors();
+      StringBuffer liveTransportClassNames = new StringBuffer();
+      StringBuffer liveTransportParams = new StringBuffer();
+      StringBuffer backupTransportClassNames = new StringBuffer();
+      StringBuffer backupTransportParams = new StringBuffer();
+      for (Pair<TransportConfiguration, TransportConfiguration> pair : pairs)
+      {
+         if (pair.a != null)
+         {
+            TransportConfiguration live = pair.a;
+            if(liveTransportClassNames.length() > 0)
+            {
+               liveTransportClassNames.append(",");
+            }
+            liveTransportClassNames.append(live.getFactoryClassName());
+
+            Map<String, Object> params = live.getParams();
+            liveTransportParams.append("{");
+            for (Map.Entry<String, Object> stringObjectEntry : params.entrySet())
+            {
+               if(liveTransportParams.length() > 0)
+               {
+                  liveTransportParams.append(",");
+               }
+               liveTransportParams.append(stringObjectEntry.getKey()).append("=").append(stringObjectEntry.getValue());
+            }
+            liveTransportParams.append("}");
+         }
+
+         if (pair.b != null)
+         {
+            TransportConfiguration backUp = pair.b;
+            if(backupTransportClassNames.length() > 0)
+            {
+               backupTransportClassNames.append(",");
+            }
+            backupTransportClassNames.append(backUp.getFactoryClassName());
+
+            Map<String, Object> params = backUp.getParams();
+            backupTransportParams.append("{");
+            for (Map.Entry<String, Object> stringObjectEntry : params.entrySet())
+            {
+               if(backupTransportParams.length() > 0)
+               {
+                  backupTransportParams.append(",");
+               }
+               backupTransportParams.append(stringObjectEntry.getKey()).append("=").append(stringObjectEntry.getValue());
+            }
+            backupTransportParams.append("}");
+         }
+
+      }
+      cvs.set("liveTransportClassNames", new SimpleValueSupport(SimpleMetaType.STRING, liveTransportClassNames));
+      cvs.set("liveTransportParams", new SimpleValueSupport(SimpleMetaType.STRING, liveTransportParams));
+      cvs.set("backupTransportClassNames", new SimpleValueSupport(SimpleMetaType.STRING, backupTransportClassNames));
+      cvs.set("backupTransportParams", new SimpleValueSupport(SimpleMetaType.STRING, backupTransportParams));
       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("DiscoveryInitialWaitTimeout", new SimpleValueSupport(SimpleMetaType.STRING, control.getDiscoveryInitialWaitTimeout()));
       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()));
@@ -160,6 +237,7 @@
       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("ConsumerMaxRate", new SimpleValueSupport(SimpleMetaType.STRING, control.getConsumerMaxRate()));
       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()));

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-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/QueueManageImplMO.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -24,6 +24,7 @@
 import org.hornetq.api.core.management.ResourceNames;
 import org.hornetq.api.jms.management.JMSQueueControl;
 import org.hornetq.api.jms.management.JMSServerControl;
+import org.hornetq.core.security.Role;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.management.ManagementService;
 import org.hornetq.jms.server.config.JMSQueueConfiguration;
@@ -33,10 +34,7 @@
 
 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;
+import java.util.*;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
@@ -110,19 +108,29 @@
       //create the queue
       jmsServerControl.createQueue(name, jndiName);
       //update security
-      jmsServerControl.addSecuritySettings(sendRoles, consumeRoles, null, null, null, null, null, null);
+      jmsServerControl.addSecuritySettings("jms.queue." + name, sendRoles, consumeRoles, "", "", "", "", "");
    }
 
+   @ManagementOperation(name = "deleteQueue", description = "delete the queue",
+       params = {@ManagementParameter(name = "name", description = "the queue name")})
+   public void deleteQueue(String name) throws Exception
+   {
+      jmsServerControl.destroyQueue(name.replace("jms.queue.", ""));
+      jmsServerControl.removeSecuritySettings(name);
+   }
+
    @ManagementOperation(name = "getQueueConfiguration", description = "Returns a queues configuration",
        params = {@ManagementParameter(name = "name", description = "the queue name")})
    @MetaMapping(value = AddressSettingsMapper.class)
-   public Object[] getQueueConfiguration(String name)
+   public Object[] getQueueConfiguration(String name) throws Exception
    {
-      Object[] config = new Object[2];
+      Object[] config = new Object[3];
       JMSQueueControl control = (JMSQueueControl) managementService.getResource(name);
       JMSQueueConfiguration queueConfiguration = new JMSQueueConfigurationImpl(control.getName(), control.getSelector(), !control.isTemporary(), control.getJNDIBinding());
       config[0] = queueConfiguration;
       config[1] = jmsServerControl.getAddressSettings(name);
+      Set<Role> roles = jmsServerControl.getSecuritySettings(name);
+      config[2] = roles;
       return config;
    }
 
@@ -139,7 +147,9 @@
            @ManagementParameter(name = "lastValueQueue", description = "Last Value Queue"),
            @ManagementParameter(name = "redistributionDelay", description = "Redistribution Delay"),
            @ManagementParameter(name = "sendToDLAOnNoRoute", description = "Send To DLA on no route"),
-           @ManagementParameter(name = "addressFullMessagePolicy", description = "Address Full Message Policy")
+           @ManagementParameter(name = "addressFullMessagePolicy", description = "Address Full Message Policy"),
+           @ManagementParameter(name = "sendRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "consumeRoles", description = "consume roles for a queue")
        })
    public void updateQueueConfiguration(String name,
                                         String jndiName,
@@ -152,9 +162,12 @@
                                         boolean lastValueQueue,
                                         long redistributionDelay,
                                         boolean sendToDLAOnNoRoute,
-                                        String addressFullMessagePolicy) throws Exception
+                                        String addressFullMessagePolicy,
+                                        String sendRoles,
+                                        String consumeRoles) throws Exception
    {
-      jmsServerControl.addAddressSettings("jms.queue." + name,
+      //update the address settings
+      jmsServerControl.addAddressSettings(name,
           dla,
           expiryAddress,
           lastValueQueue,
@@ -165,6 +178,8 @@
           redistributionDelay,
           sendToDLAOnNoRoute,
           addressFullMessagePolicy);
+      //update security
+      jmsServerControl.addSecuritySettings(name, sendRoles, consumeRoles, "", "", "", "", "");
    }
 
    @ManagementOperation(name = "getQueueMeasurements", description = "updates a queues configuration",

Modified: 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	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/TopicManageMO.java	2010-03-24 09:07:37 UTC (rev 102862)
@@ -24,6 +24,7 @@
 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.security.Role;
 import org.hornetq.core.server.HornetQServer;
 import org.hornetq.core.server.management.ManagementService;
 import org.hornetq.jms.server.config.TopicConfiguration;
@@ -33,10 +34,7 @@
 
 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;
+import java.util.*;
 
 /**
  * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
@@ -61,20 +59,144 @@
       managementService = server.getManagementService();
       jmsServerControl = (JMSServerControl) managementService.getResource(ResourceNames.JMS_SERVER);
    }
-   
+
+   @ManagementOperation(name = "deleteTopic", description = "delete the topic",
+       params = {@ManagementParameter(name = "name", description = "the queue name")})
+   public void deleteTopic(String name) throws Exception
+   {
+      jmsServerControl.destroyTopic(name.replace("jms.topic.", ""));
+      jmsServerControl.removeSecuritySettings(name);
+   }
+
    @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)
+   public Object[] getTopicConfiguration(String name) throws Exception 
    {
-      Object[] config = new Object[2];
+      Object[] config = new Object[3];
       TopicControl control = (TopicControl) managementService.getResource(name);
       TopicConfiguration topicConfiguration = new TopicConfigurationImpl(control.getName(), control.getJNDIBinding());
       config[0] = topicConfiguration;
       config[1] = jmsServerControl.getAddressSettings(name);
+      Set<Role> roles = jmsServerControl.getSecuritySettings(name);
+      config[2] = roles;
       return config;
    }
+   @ManagementOperation(name = "createQueue", description = "Creates a new Queue",
+       params = {
+           @ManagementParameter(name = "name", description = "the queue name"),
+           @ManagementParameter(name = "jndiName", description = "The JNDI Name of the queue"),
+           @ManagementParameter(name = "dla", description = "Dead Letter Address"),
+           @ManagementParameter(name = "expiryAddress", description = "Expiry Address"),
+           @ManagementParameter(name = "maxSizeBytes", description = "Max Size of Address"),
+           @ManagementParameter(name = "pageSizeBytes", description = "Page Size"),
+           @ManagementParameter(name = "deliveryAttempts", description = "Max Delivery Attempts"),
+           @ManagementParameter(name = "redeliveryDelay", description = "Redelivery Delay"),
+           @ManagementParameter(name = "lastValueQueue", description = "Last Value Queue"),
+           @ManagementParameter(name = "redistributionDelay", description = "Redistribution Delay"),
+           @ManagementParameter(name = "sendToDLAOnNoRoute", description = "Send To DLA on no route"),
+           @ManagementParameter(name = "addressFullMessagePolicy", description = "Address Full Message Policy"),
+           @ManagementParameter(name = "sendRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "consumeRoles", description = "consume roles for a queue"),
+           @ManagementParameter(name = "createDurableQueueRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "deleteDurableQueueRoles", description = "consume roles for a queue"),
+           @ManagementParameter(name = "createTempQueueRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "deleteTempQueueRoles", description = "consume roles for a queue")
+       })
+   public void createTopic(String name,
+                           String jndiName,
+                           String DLA,
+                           String expiryAddress,
+                           long maxSizeBytes,
+                           int pageSizeBytes,
+                           int deliveryAttempts,
+                           long redeliveryDelay,
+                           boolean lastValueQueue,
+                           long redistributionDelay,
+                           boolean sendToDLAOnNoRoute,
+                           String addressFullMessagePolicy,
+                           String sendRoles,
+                           String consumeRoles,
+                           final String createDurableQueueRoles,
+                           final String deleteDurableQueueRoles,
+                           final String createTempQueueRoles,
+                           final String deleteTempQueueRoles) throws Exception
+   {
 
+      //update the address settings
+      jmsServerControl.addAddressSettings("jms.queue." + name,
+          DLA,
+          expiryAddress,
+          lastValueQueue,
+          deliveryAttempts,
+          maxSizeBytes,
+          pageSizeBytes,
+          redeliveryDelay,
+          redistributionDelay,
+          sendToDLAOnNoRoute,
+          addressFullMessagePolicy);
+      //create the queue
+      jmsServerControl.createTopic(name, jndiName);
+      //update security
+      jmsServerControl.addSecuritySettings(name, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createTempQueueRoles, deleteTempQueueRoles, "");
+   }
+
+   @ManagementOperation(name = "updateQueueConfiguration", description = "updates a queues configuration",
+       params = {
+           @ManagementParameter(name = "name", description = "the queue name"),
+           @ManagementParameter(name = "jndiName", description = "The JNDI Name of the queue"),
+           @ManagementParameter(name = "dla", description = "Dead Letter Address"),
+           @ManagementParameter(name = "expiryAddress", description = "Expiry Address"),
+           @ManagementParameter(name = "maxSizeBytes", description = "Max Size of Address"),
+           @ManagementParameter(name = "pageSizeBytes", description = "Page Size"),
+           @ManagementParameter(name = "deliveryAttempts", description = "Max Delivery Attempts"),
+           @ManagementParameter(name = "redeliveryDelay", description = "Redelivery Delay"),
+           @ManagementParameter(name = "lastValueQueue", description = "Last Value Queue"),
+           @ManagementParameter(name = "redistributionDelay", description = "Redistribution Delay"),
+           @ManagementParameter(name = "sendToDLAOnNoRoute", description = "Send To DLA on no route"),
+           @ManagementParameter(name = "addressFullMessagePolicy", description = "Address Full Message Policy"),
+           @ManagementParameter(name = "sendRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "consumeRoles", description = "consume roles for a queue")              ,
+           @ManagementParameter(name = "createDurableQueueRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "deleteDurableQueueRoles", description = "consume roles for a queue"),
+           @ManagementParameter(name = "createTempQueueRoles", description = "Send roles for a queue"),
+           @ManagementParameter(name = "deleteTempQueueRoles", description = "consume roles for a queue")
+       })
+   public void updateTopicConfiguration(String name,
+                                        String jndiName,
+                                        String dla,
+                                        String expiryAddress,
+                                        long maxSizeBytes,
+                                        int pageSizeBytes,
+                                        int deliveryAttempts,
+                                        long redeliveryDelay,
+                                        boolean lastValueQueue,
+                                        long redistributionDelay,
+                                        boolean sendToDLAOnNoRoute,
+                                        String addressFullMessagePolicy,
+                                        String sendRoles,
+                                        String consumeRoles,
+                                         final String createDurableQueueRoles,
+                                         final String deleteDurableQueueRoles,
+                                         final String createTempQueueRoles,
+                                         final String deleteTempQueueRoles) throws Exception
+   {
+      //update the address settings
+      jmsServerControl.addAddressSettings(name,
+          dla,
+          expiryAddress,
+          lastValueQueue,
+          deliveryAttempts,
+          maxSizeBytes,
+          pageSizeBytes,
+          redeliveryDelay,
+          redistributionDelay,
+          sendToDLAOnNoRoute,
+          addressFullMessagePolicy);
+      //update security
+      jmsServerControl.addSecuritySettings(name, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createTempQueueRoles, deleteTempQueueRoles, "");
+   }
+
    @ManagementOperation(name = "getTopicMeasurements", description = "updates a queues configuration",
        params = {
            @ManagementParameter(name = "name", description = "the queue name"),

Modified: trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml
===================================================================
--- trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-03-24 08:11:30 UTC (rev 102861)
+++ trunk/hornetq-int/src/resources/META-INF/rhq-plugin.xml	2010-03-24 09:07:37 UTC (rev 102862)
@@ -284,24 +284,24 @@
                </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.">
+                                description="These are the attributes that define a role for this specific address. The 'name' of the role, 'send' allows a producer to send a message, 'consume' allows a consumer or subscriber to receive a message.">
                   <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"
+                                        displayName="name"
                                         description="The name of the role?"
                                         summary="true"
                                         required="true"
                                         type="string"/>
                      <c:simple-property name="send"
-                                        displayName="Read"
+                                        displayName="send"
                                         description="Is this role allowed to write messages to this address?"
                                         summary="true"
                                         required="true"
                                         type="boolean"/>
                      <c:simple-property name="consume"
-                                        displayName="Write"
+                                        displayName="consume"
                                         description="Is this role allowed to read messages from this address?"
                                         summary="true"
                                         required="true"
@@ -475,28 +475,52 @@
                </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.">
+                                description="These are the attributes that define a role for this specific address. The 'name' of the role, 'send' allows a producer to send a message, 'consume' allows a consumer or subscriber to receive a message. The create/delete (non) durable subscriber specifies whether the queue representing the subscription can be created or deleted">
                   <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">
+                                  description="These are the attributes that define a role for this specific address.">
                      <c:simple-property name="name"
-                                        displayName="Read"
+                                        displayName="name"
                                         description="The name of the role?"
                                         summary="true"
                                         required="true"
                                         type="string"/>
                      <c:simple-property name="send"
-                                        displayName="Read"
+                                        displayName="send"
                                         description="Is this role allowed to write messages to this address?"
                                         summary="true"
                                         required="true"
                                         type="boolean"/>
                      <c:simple-property name="consume"
-                                        displayName="Write"
+                                        displayName="consume"
                                         description="Is this role allowed to read messages from this address?"
                                         summary="true"
                                         required="true"
                                         type="boolean"/>
+                     <c:simple-property name="createNonDurableQueue"
+                                        displayName="create subscriber"
+                                        description="Are Non Durable Subscribers allowed to be created on this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                     <c:simple-property name="deleteNonDurableQueue"
+                                        displayName="delete subscriber"
+                                        description="Are Non Durable Subscribers allowed to be deleted on this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                     <c:simple-property name="createDurableQueue"
+                                        displayName="create durable subscriber"
+                                        description="Are Durable Subscribers allowed to be created on this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
+                     <c:simple-property name="deleteDurableQueue"
+                                        displayName="delete durable subscriber"
+                                        description="Are Durable Subscribers allowed to be deleted on this address?"
+                                        summary="true"
+                                        required="true"
+                                        type="boolean"/>
                   </c:map-property>
 
                </c:list-property>
@@ -515,10 +539,6 @@
                  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">
@@ -527,39 +547,45 @@
                <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="liveTransportClassNames" default="org.hornetq.integration.transports.netty.NettyConnectorFactory"  readOnly="true"
+                                  required="false" displayName="comma-separated list of class names for transport to live servers"/>
+               <c:simple-property name="liveTransportParams" default="{host=localhost,port=5005}"      readOnly="true"
+                                  required="false" displayName="comma-separated list of key=value parameters for the live transports ( enclosed between { })"/>
+               <c:simple-property name="backupTransportClassNames" required="false" readOnly="true" displayName="comma-separated list of class names for transport to backup servers"/>
+               <c:simple-property name="backupTransportParams" required="false" readOnly="true" displayName="comma-separated list of key=value parameters for the backup transports (enclosed between { })"/>
+               <c:simple-property name="DiscoveryAddress" required="false"  readOnly="true" displayName="Discovery Address"/>
+               <c:simple-property name="DiscoveryPort" default="0" readOnly="true" type="integer" displayName="Discovery Port"/>
+               <c:simple-property name="DiscoveryRefreshTimeout" default="10000" type="long" displayName="Discovery Refresh Timeout"/>
+               <c:simple-property name="DiscoveryInitialWaitTimeout" default="2000" 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="DupsOKBatchSize" default="1048576" type="integer" displayName="Dups OK Batch Size"/>
+               <c:simple-property name="TransactionBatchSize" default="1048576" type="integer" displayName="Transaction Batch Size"/>
+               <c:simple-property name="ClientFailureCheckPeriod" default="30000" type="long" displayName="Client Failure Check Period"/>
+               <c:simple-property name="ConnectionTTL" default="60000" type="long" displayName="Connection TTL"/>
+               <c:simple-property name="CallTimeout" default="30000" type="long" displayName="Call Timeout"/>
+               <c:simple-property name="ConsumerWindowSize" default="-1" type="integer" displayName="Consumer Window Size"/>
+               <c:simple-property name="ConsumerMaxRate" default="-1" type="integer" displayName="Consumer Max Rate"/>
+               <c:simple-property name="ConfirmationWindowSize" default="-1" type="integer" displayName="Confirmation Window Size"/>
+               <c:simple-property name="ProducerMaxRate" default="-1" type="integer" displayName="Producer Max Rate"/>
+               <c:simple-property name="ProducerWindowSize" default="-1" type="integer" displayName="Producer Window Size"/>
+               <c:simple-property name="CacheLargeMessagesClient" default="false" type="boolean" displayName="Cache Large Messages Client"/>
+               <c:simple-property name="MinLargeMessageSize" default="1048576" type="integer" displayName="Min Large Message Size"/>
+               <c:simple-property name="BlockOnNonDurableSend"  default="false" type="boolean" displayName="Block On Non Durable Send"/>
+               <c:simple-property name="BlockOnAcknowledge" default="false" type="boolean" displayName="Block On Acknowledge"/>
+               <c:simple-property name="BlockOnDurableSend" default="true" type="boolean" displayName="Block On Durable Send"/>
+               <c:simple-property name="AutoGroup" default="false" type="boolean" displayName="Auto Group"/>
+               <c:simple-property name="PreAcknowledge" default="false" type="boolean" displayName="Pre Acknowledge"/>
+               <c:simple-property name="MaxRetryInterval" default="2000" type="long" displayName="Max Retry Interval"/>
+               <c:simple-property name="RetryIntervalMultiplier" default="1.0" 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:simple-property name="FailoverOnServerShutdown"  default="false" type="boolean" displayName="Failover On Server Shutdown"/>
+               <c:simple-property name="ScheduledThreadPoolMaxSize" default="5" type="integer" displayName="Scheduled Thread Pool Max Size"/>
+               <c:simple-property name="ThreadPoolMaxSize" default="-1" type="integer" displayName="Thread Pool Max Size"/>
+               <c:simple-property name="GroupID" default="false" type="boolean" required="false" displayName="Group ID"/>
+               <c:simple-property name="InitialMessagePacketSize" default="1500" type="integer" displayName="Initial Message Packet Size"/>
+               <c:simple-property name="UseGlobalPools" default="true" type="boolean" displayName="Use Global Pools"/>
+               <c:simple-property name="RetryInterval" default="2000" type="long" displayName="Retry Interval"/>
+               <c:simple-property name="ConnectionLoadBalancingPolicyClassName" default="org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy" displayName="Connection Load Balancing Policy Class Name"/>
             </c:group>
          </resource-configuration>
       </service>




More information about the jboss-cvs-commits mailing list