[jboss-cvs] JBossAS SVN: r109811 - in branches/JBPAPP_5_1_0_Final_HornetQ_2_2: connector and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 9 16:34:56 EST 2010


Author: clebert.suconic at jboss.com
Date: 2010-12-09 16:34:55 -0500 (Thu, 09 Dec 2010)
New Revision: 109811

Modified:
   branches/JBPAPP_5_1_0_Final_HornetQ_2_2/component-matrix/pom.xml
   branches/JBPAPP_5_1_0_Final_HornetQ_2_2/connector/.classpath
   branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java
   branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java
Log:
Creating EAP/HornetQ branch of EAP 5.1.Final / updating changes from 5.1.HEAD

Modified: branches/JBPAPP_5_1_0_Final_HornetQ_2_2/component-matrix/pom.xml
===================================================================
--- branches/JBPAPP_5_1_0_Final_HornetQ_2_2/component-matrix/pom.xml	2010-12-09 20:24:52 UTC (rev 109810)
+++ branches/JBPAPP_5_1_0_Final_HornetQ_2_2/component-matrix/pom.xml	2010-12-09 21:34:55 UTC (rev 109811)
@@ -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.1.2.Final</version.hornetq>
+    <version.hornetq>2.2.0.QA3</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>
@@ -1020,7 +1020,7 @@
        <dependency>
          <groupId>org.jboss.netty</groupId>
          <artifactId>netty</artifactId>
-         <version>3.2.1.Final</version>
+         <version>3.2.3.Final</version>
        </dependency>
       
       <dependency>

Modified: branches/JBPAPP_5_1_0_Final_HornetQ_2_2/connector/.classpath
===================================================================
--- branches/JBPAPP_5_1_0_Final_HornetQ_2_2/connector/.classpath	2010-12-09 20:24:52 UTC (rev 109810)
+++ branches/JBPAPP_5_1_0_Final_HornetQ_2_2/connector/.classpath	2010-12-09 21:34:55 UTC (rev 109811)
@@ -6,8 +6,8 @@
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/jboss/serialization/lib/jboss-serialization.jar"/>
-	<classpathentry exported="true" kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-xjc.jar"/>
-	<classpathentry exported="true" kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-impl.jar"/>
+	<classpathentry exported="true" kind="lib" path="/thirdparty/com/sun/xml/bind/lib/jaxb-xjc.jar"/>
+	<classpathentry exported="true" kind="lib" path="/thirdparty/com/sun/xml/bind/lib/jaxb-impl.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/quartz/lib/quartz.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar" sourcepath="/thirdparty/junit/lib/junit-src.zip"/>

Modified: branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	2010-12-09 20:24:52 UTC (rev 109810)
+++ branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryManageMO.java	2010-12-09 21:34:55 UTC (rev 109811)
@@ -103,14 +103,11 @@
    @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 = "cfType", description = "the type of connection factory"),
+           @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 +128,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 +135,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 +161,6 @@
                                         long maxRetryInterval,
                                         double retryIntervalMultiplier,
                                         int reconnectAttempts,
-                                        boolean failoverOnShutdown,
                                         int scheduledThreadPoolMaxSize,
                                         int threadPoolMaxSize,
                                         String groupId,
@@ -178,17 +170,9 @@
                                         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);
-      }
+      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);
@@ -209,7 +193,6 @@
       control.setMaxRetryInterval(maxRetryInterval);
       control.setRetryIntervalMultiplier(retryIntervalMultiplier);
       control.setReconnectAttempts(reconnectAttempts);
-      control.setFailoverOnServerShutdown(failoverOnShutdown);
       control.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
       control.setThreadPoolMaxSize(threadPoolMaxSize);
       control.setGroupID(groupId);
@@ -222,7 +205,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"),
@@ -243,7 +226,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"),
@@ -252,7 +234,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,
@@ -273,7 +254,6 @@
                                         long maxRetryInterval,
                                         double retryIntervalMultiplier,
                                         int reconnectAttempts,
-                                        boolean failoverOnShutdown,
                                         int scheduledThreadPoolMaxSize,
                                         int threadPoolMaxSize,
                                         String groupId,
@@ -284,7 +264,7 @@
          throws Exception
    {
       ConnectionFactoryControl control = (ConnectionFactoryControl) managementService.getResource("jms.connectionfactory." + name);
-      control.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+      
       control.setClientID(clientId);
       control.setDupsOKBatchSize(dupsOkBatchSize);
       control.setTransactionBatchSize(transactionBatchSize);
@@ -305,7 +285,6 @@
       control.setMaxRetryInterval(maxRetryInterval);
       control.setRetryIntervalMultiplier(retryIntervalMultiplier);
       control.setReconnectAttempts(reconnectAttempts);
-      control.setFailoverOnServerShutdown(failoverOnShutdown);
       control.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
       control.setThreadPoolMaxSize(threadPoolMaxSize);
       control.setGroupID(groupId);

Modified: branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java
===================================================================
--- branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	2010-12-09 20:24:52 UTC (rev 109810)
+++ branches/JBPAPP_5_1_0_Final_HornetQ_2_2/hornetq-int/src/main/java/org/jboss/as/integration/hornetq/management/jms/ConnectionFactoryMapper.java	2010-12-09 21:34:55 UTC (rev 109811)
@@ -21,7 +21,9 @@
  */
 package org.jboss.as.integration.hornetq.management.jms;
 
-import org.hornetq.api.core.Pair;
+import java.lang.reflect.Type;
+
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.jms.management.ConnectionFactoryControl;
 import org.jboss.metatype.api.types.CompositeMetaType;
@@ -33,10 +35,6 @@
 import org.jboss.metatype.api.values.SimpleValueSupport;
 import org.jboss.metatype.spi.values.MetaMapper;
 
-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>
  *         Created Mar 19, 2010
@@ -48,15 +46,11 @@
    {
       String[] itemNames = {
             "name",
-            "liveTransportClassNames",
-            "liveTransportParams",
-            "backupTransportClassNames",
-            "backupTransportParams",
+            "ha",
+            "useDiscovery",
+            "cfType",
+            "connectorNames",
             "Bindings",
-            "DiscoveryAddress",
-            "DiscoveryPort",
-            "DiscoveryRefreshTimeout",
-            "DiscoveryInitialWaitTimeout",
             "ClientID",
             "DupsOKBatchSize",
             "TransactionBatchSize",
@@ -89,15 +83,11 @@
       };
       String[] itemDescriptions = {
             "name",
-            "liveTransportClassNames",
-            "liveTransportParams",
-            "backupTransportClassNames",
-            "backupTransportParams",
+            "ha",
+            "useDiscovery",
+            "cfType",
+            "connectorNames",
             "Bindings",
-            "DiscoveryAddress",
-            "DiscoveryPort",
-            "DiscoveryRefreshTimeout",
-            "DiscoveryInitialWaitTimeout",
             "ClientID",
             "DupsOKBatchSize",
             "TransactionBatchSize",
@@ -163,10 +153,6 @@
             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,67 +164,32 @@
    {
       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() > 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("ha", new SimpleValueSupport(SimpleMetaType.STRING, control.isHA()));
+      cvs.set("useDiscovery", new SimpleValueSupport(SimpleMetaType.STRING, control.getDiscoveryGroupConfiguration() != null));
+      //todo uncomment on next HornetQ release
+      //cvs.set("cfType", new SimpleValueSupport(SimpleMetaType.STRING, control.getFactoryType()));
+      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()));
@@ -260,7 +211,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()));
-      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