[jboss-cvs] JBossAS SVN: r109686 - in branches/JBPAPP_5_1: hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 2 22:33:39 EST 2010


Author: clebert.suconic at jboss.com
Date: 2010-12-02 22:33:39 -0500 (Thu, 02 Dec 2010)
New Revision: 109686

Modified:
   branches/JBPAPP_5_1/component-matrix/pom.xml
   branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java
   branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java
Log:
upgrade HornetQ to QA2 with fixes on the profile

Modified: branches/JBPAPP_5_1/component-matrix/pom.xml
===================================================================
--- branches/JBPAPP_5_1/component-matrix/pom.xml	2010-12-03 01:54:10 UTC (rev 109685)
+++ branches/JBPAPP_5_1/component-matrix/pom.xml	2010-12-03 03:33:39 UTC (rev 109686)
@@ -41,7 +41,7 @@
     <version.jboss.jbossws>3.1.2.SP7</version.jboss.jbossws>
     <version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
     <version.jboss.messaging>1.4.7.GA</version.jboss.messaging>
-    <version.hornetq>2.2.0.QA1</version.hornetq>
+    <version.hornetq>2.2.0.QA2</version.hornetq>
     <version.jboss.web>2.1.10.GA</version.jboss.web>
     <version.jgroups>2.6.16.GA</version.jgroups>
     <version.junit>3.8.2</version.junit>

Modified: branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java
===================================================================
--- branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	2010-12-03 01:54:10 UTC (rev 109685)
+++ branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	2010-12-03 03:33:39 UTC (rev 109686)
@@ -103,14 +103,10 @@
    @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 = "ha", description = "does the connection factory support high availibility"),
+           @ManagementParameter(name = "useDiscovery", description = "should we use a discovery group configuration or a connector configuration"),
+           @ManagementParameter(name = "connectorNames", description = "comma-separated list of connectors to uses"),
            @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"),
@@ -131,7 +127,6 @@
            @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"),
@@ -139,15 +134,12 @@
            @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, 
+   public void createConnectionFactory(final String name,
+                                       final boolean ha,
+                                       final boolean useDiscovery,
+                                       final int cfType,
+                                        final String connectorNames,
                                         String bindings,
-                                        String discoveryAddress,
-                                        int discoveryPort,
-                                        long discoveryRefreshTimeout,
                                         String clientId,
                                         int dupsOkBatchSize,
                                         int transactionBatchSize,
@@ -168,7 +160,6 @@
                                         long maxRetryInterval,
                                         double retryIntervalMultiplier,
                                         int reconnectAttempts,
-                                        boolean failoverOnShutdown,
                                         int scheduledThreadPoolMaxSize,
                                         int threadPoolMaxSize,
                                         String groupId,
@@ -178,19 +169,9 @@
                                         String connectionLoadBalancingPolicyClassName)
          throws Exception
    {
-      if(liveTransportClassNames != null)
-      {
-    	// TODO for AndyTaylor: verify this
-//         jmsServerControl.createConnectionFactory(name, liveTransportClassNames, liveTransportParams == null?"":liveTransportParams,
-//               backupTransportClassNames == null?"":backupTransportClassNames, backupTransportParams == null?"":backupTransportParams, bindings);
-      }
-      else
-      {
-    	// TODO for AndyTaylor: verify this
-//         jmsServerControl.createConnectionFactory(name, discoveryAddress, discoveryPort, bindings);
-      }
+      jmsServerControl.createConnectionFactory(name, ha, useDiscovery, cfType, connectorNames, bindings);
+
       ConnectionFactoryControl control = (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
-      control.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
       control.setClientID(clientId);
       control.setDupsOKBatchSize(dupsOkBatchSize);
       control.setTransactionBatchSize(transactionBatchSize);
@@ -211,8 +192,6 @@
       control.setMaxRetryInterval(maxRetryInterval);
       control.setRetryIntervalMultiplier(retryIntervalMultiplier);
       control.setReconnectAttempts(reconnectAttempts);
-   // TODO for AndyTaylor: verify this
-      //control.setFailoverOnServerShutdown(failoverOnShutdown);
       control.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
       control.setThreadPoolMaxSize(threadPoolMaxSize);
       control.setGroupID(groupId);
@@ -225,7 +204,7 @@
    @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 = "ha", description = "does the connection factory support high availibility"),
            @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"),
@@ -246,7 +225,6 @@
            @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"),
@@ -255,7 +233,6 @@
            @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,
@@ -276,7 +253,6 @@
                                         long maxRetryInterval,
                                         double retryIntervalMultiplier,
                                         int reconnectAttempts,
-                                        boolean failoverOnShutdown,
                                         int scheduledThreadPoolMaxSize,
                                         int threadPoolMaxSize,
                                         String groupId,
@@ -287,7 +263,7 @@
          throws Exception
    {
       ConnectionFactoryControl control = (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
-      control.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+      
       control.setClientID(clientId);
       control.setDupsOKBatchSize(dupsOkBatchSize);
       control.setTransactionBatchSize(transactionBatchSize);
@@ -308,8 +284,6 @@
       control.setMaxRetryInterval(maxRetryInterval);
       control.setRetryIntervalMultiplier(retryIntervalMultiplier);
       control.setReconnectAttempts(reconnectAttempts);
-      // TODO for AndyTaylor: verify this
-      //control.setFailoverOnServerShutdown(failoverOnShutdown);
       control.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
       control.setThreadPoolMaxSize(threadPoolMaxSize);
       control.setGroupID(groupId);

Modified: branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java
===================================================================
--- branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	2010-12-03 01:54:10 UTC (rev 109685)
+++ branches/JBPAPP_5_1/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	2010-12-03 03:33:39 UTC (rev 109686)
@@ -24,6 +24,7 @@
 import org.hornetq.api.core.Pair;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.jms.management.ConnectionFactoryControl;
+import org.hornetq.core.config.DiscoveryGroupConfiguration;
 import org.jboss.metatype.api.types.CompositeMetaType;
 import org.jboss.metatype.api.types.ImmutableCompositeMetaType;
 import org.jboss.metatype.api.types.MetaType;
@@ -48,15 +49,8 @@
    {
       String[] itemNames = {
             "name",
-            "liveTransportClassNames",
-            "liveTransportParams",
-            "backupTransportClassNames",
-            "backupTransportParams",
+            "connectorNames",
             "Bindings",
-            "DiscoveryAddress",
-            "DiscoveryPort",
-            "DiscoveryRefreshTimeout",
-            "DiscoveryInitialWaitTimeout",
             "ClientID",
             "DupsOKBatchSize",
             "TransactionBatchSize",
@@ -89,15 +83,8 @@
       };
       String[] itemDescriptions = {
             "name",
-            "liveTransportClassNames",
-            "liveTransportParams",
-            "backupTransportClassNames",
-            "backupTransportParams",
+            "connectorNames",
             "Bindings",
-            "DiscoveryAddress",
-            "DiscoveryPort",
-            "DiscoveryRefreshTimeout",
-            "DiscoveryInitialWaitTimeout",
             "ClientID",
             "DupsOKBatchSize",
             "TransactionBatchSize",
@@ -160,13 +147,6 @@
             SimpleMetaType.STRING,
             SimpleMetaType.STRING,
             SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
-            SimpleMetaType.STRING,
             SimpleMetaType.STRING
       };
       TYPE = new ImmutableCompositeMetaType("javax.jms.ConnectionFactory", "Connection Factory Settings",
@@ -178,68 +158,29 @@
    {
       CompositeValueSupport cvs = new CompositeValueSupport(TYPE);
       cvs.set("name", new SimpleValueSupport(SimpleMetaType.STRING, control.getName()));
-   // TODO for AndyTaylor: verify this
-      List<org.hornetq.api.core.Pair<TransportConfiguration, TransportConfiguration>> pairs = null;
-      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() > 1)
-               {
-                  liveTransportParams.append(",");
-               }
-               liveTransportParams.append(stringObjectEntry.getKey()).append("=").append(stringObjectEntry.getValue());
-            }
-            liveTransportParams.append("}");
-         }
+      TransportConfiguration[] connectors = control.getStaticConnectors();
+      DiscoveryGroupConfiguration groupConfiguration = control.getDiscoveryGroupConfiguration();
 
-         if (pair.b != null)
+      StringBuffer connectorNames = new StringBuffer();
+      if (groupConfiguration == null)
+      {
+         for (TransportConfiguration connector : connectors)
          {
-            TransportConfiguration backUp = pair.b;
-            if(backupTransportClassNames.length() > 0)
+            if(connectorNames.length() > 0)
             {
-               backupTransportClassNames.append(",");
+               connectorNames.append(",");
             }
-            backupTransportClassNames.append(backUp.getFactoryClassName());
-
-            Map<String, Object> params = backUp.getParams();
-            backupTransportParams.append("{");
-            for (Map.Entry<String, Object> stringObjectEntry : params.entrySet())
-            {
-               if(backupTransportParams.length() > 1)
-               {
-                  backupTransportParams.append(",");
-               }
-               backupTransportParams.append(stringObjectEntry.getKey()).append("=").append(stringObjectEntry.getValue());
-            }
-            backupTransportParams.append("}");
+            connectorNames.append(connector.getName());
          }
-
       }
-      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));
+      else
+      {
+         connectorNames.append(groupConfiguration.getName());
+      }
+
+      cvs.set("connectorNames", new SimpleValueSupport(SimpleMetaType.STRING, connectorNames));
       cvs.set("Bindings", new SimpleValueSupport(SimpleMetaType.STRING, getJndiString(control.getJNDIBindings())));
-      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()));
@@ -261,8 +202,6 @@
       cvs.set("MaxRetryInterval", new SimpleValueSupport(SimpleMetaType.STRING, control.getMaxRetryInterval()));
       cvs.set("RetryIntervalMultiplier", new SimpleValueSupport(SimpleMetaType.STRING, control.getRetryIntervalMultiplier()));
       cvs.set("ReconnectAttempts", new SimpleValueSupport(SimpleMetaType.STRING, control.getReconnectAttempts()));
-   // TODO for AndyTaylor: verify this
-     // cvs.set("FailoverOnServerShutdown", new SimpleValueSupport(SimpleMetaType.STRING, control.isFailoverOnServerShutdown()));
       cvs.set("ScheduledThreadPoolMaxSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getScheduledThreadPoolMaxSize()));
       cvs.set("ThreadPoolMaxSize", new SimpleValueSupport(SimpleMetaType.STRING, control.getThreadPoolMaxSize()));
       cvs.set("GroupID", new SimpleValueSupport(SimpleMetaType.STRING, control.getGroupID()));



More information about the jboss-cvs-commits mailing list