[jboss-cvs] JBoss Messaging SVN: r6538 - in trunk: src/main/org/jboss/messaging/jms/server/management and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 23 08:30:51 EDT 2009


Author: jmesnil
Date: 2009-04-23 08:30:50 -0400 (Thu, 23 Apr 2009)
New Revision: 6538

Modified:
   trunk/src/main/org/jboss/messaging/core/client/management/impl/ManagementHelper.java
   trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java
   trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java
   trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java
   trunk/src/main/org/jboss/messaging/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java
   trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControl2Test.java
   trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
Log:
* modified JMS Server Control class to allow multiple JNDI bindings when creating a connection factory
* modified all createConnectionFactory methods to take String[]?\194?\160for JNDI bindings

Modified: trunk/src/main/org/jboss/messaging/core/client/management/impl/ManagementHelper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/management/impl/ManagementHelper.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/src/main/org/jboss/messaging/core/client/management/impl/ManagementHelper.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -138,7 +138,7 @@
                {
                   value = null;
                }
-               if (value.toString().startsWith("L["))
+               else if (value.toString().startsWith("L["))
                {
                   String str = value.toString().substring(2);
                   String[] strings = str.split("\\|\\|");

Modified: trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -100,7 +100,7 @@
                                       double retryIntervalMultiplier,
                                       int reconnectAttempts,
                                       boolean failoverOnNodeShutdown,
-                                      String jndiBinding) throws Exception;
+                                      String[] jndiBindings) throws Exception;
 
    @Operation(desc = "Create a JMS ConnectionFactory with a static list of servers", impact = ACTION)
    void createConnectionFactory(@Parameter(name = "name", desc = "Name of the ConnectionFactory to create")
@@ -151,8 +151,8 @@
                                 int reconnectAttempts,
                                 @Parameter(name = "failoverOnNodeShutdown", desc = "If the server is cleanly shutdown, should the client attempt failover to backup (if specified)?")
                                 boolean failoverOnNodeShutdown,
-                                @Parameter(name = "jndiBinding", desc = "JNDI Binding")
-                                String jndiBinding) throws Exception;
+                                @Parameter(name = "jndiBindings", desc = "JNDI Bindings")
+                                String[] jndiBindings) throws Exception;
 
    @Operation(desc = "Create a JMS ConnectionFactory specifying a discovery group to obtain list of servers from", impact = ACTION)
    void createConnectionFactory(@Parameter(name = "name", desc = "Name of the ConnectionFactory to create")
@@ -211,8 +211,8 @@
                                 int reconnectAttempts,
                                 @Parameter(name = "failoverOnNodeShutdown", desc = "If the server is cleanly shutdown, should the client attempt failover to backup (if specified)?")
                                 boolean failoverOnNodeShutdown,
-                                @Parameter(name = "jndiBinding", desc = "JNDI Binding")
-                                String jndiBinding) throws Exception;
+                                @Parameter(name = "jndiBindings", desc = "JNDI Bindings")
+                                String[] jndiBindings) throws Exception;
 
    @Operation(desc = "Create a JMS ConnectionFactory", impact = ACTION)
    void destroyConnectionFactory(@Parameter(name = "name", desc = "Name of the ConnectionFactory to create")

Modified: trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSManagementHelper.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -22,11 +22,11 @@
 package org.jboss.messaging.jms.server.management.impl;
 
 import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_ATTRIBUTE;
-import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_RESOURCE_NAME;
 import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_OPERATION_EXCEPTION;
 import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_OPERATION_NAME;
 import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_OPERATION_PREFIX;
 import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_OPERATION_SUCCEEDED;
+import static org.jboss.messaging.core.client.management.impl.ManagementHelper.HDR_RESOURCE_NAME;
 
 import javax.jms.JMSException;
 import javax.jms.Message;
@@ -150,6 +150,16 @@
       {
          message.setStringProperty(key, (String)typedProperty);
       }
+      else if (typedProperty instanceof String[])
+      {
+         String str = "L[";
+         String[] strings = (String[])typedProperty;
+         for (String string : strings)
+         {
+            str += string + "||";
+         }
+         message.setStringProperty(key, str);         
+      }
       // serialize as a SimpleString
       else
       {

Modified: trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -103,11 +103,8 @@
                                        double retryIntervalMultiplier,                                       
                                        int reconnectAttempts,
                                        boolean failoverOnNodeShutdown,
-                                       String jndiBinding) throws Exception
+                                       String[] jndiBindings) throws Exception
    {
-      List<String> bindings = new ArrayList<String>();
-      bindings.add(jndiBinding);
-
       List<Pair<TransportConfiguration, TransportConfiguration>> connectorConfigs = new ArrayList<Pair<TransportConfiguration, TransportConfiguration>>();
       connectorConfigs.add(new Pair<TransportConfiguration, TransportConfiguration>(new TransportConfiguration(connectorFactoryClassName), null));
       
@@ -135,7 +132,7 @@
                                                        retryIntervalMultiplier,                                                       
                                                        reconnectAttempts,
                                                        failoverOnNodeShutdown,
-                                                       bindings);
+                                                       Arrays.asList(jndiBindings));
       if (created)
       {
          sendNotification(NotificationType.CONNECTION_FACTORY_CREATED, name);
@@ -206,11 +203,8 @@
                                        double retryIntervalMultiplier,                                       
                                        int reconnectAttempts,
                                        boolean failoverOnNodeShutdown,
-                                       String jndiBinding) throws Exception
+                                       String[] jndiBindings) throws Exception
    {
-      List<String> bindings = new ArrayList<String>();
-      bindings.add(jndiBinding);
-
       boolean created = server.createConnectionFactory(name,
                                                        connectorConfigs,
                                                        connectionLoadBalancingPolicyClassName,
@@ -235,7 +229,7 @@
                                                        retryIntervalMultiplier,                                                       
                                                        reconnectAttempts,
                                                        failoverOnNodeShutdown,
-                                                       bindings);
+                                                       Arrays.asList(jndiBindings));
       if (created)
       {
          sendNotification(NotificationType.CONNECTION_FACTORY_CREATED, name);
@@ -270,11 +264,8 @@
                                        final double retryIntervalMultiplier,
                                        final int reconnectAttempts,
                                        final boolean failoverOnNodeShutdown,
-                                       final String jndiBinding) throws Exception
+                                       final String[] jndiBindings) throws Exception
    {      
-      List<String> bindings = new ArrayList<String>();
-      bindings.add(jndiBinding);
-
       DiscoveryGroupConfiguration discoveryGroupConfig = new DiscoveryGroupConfiguration(discoveryGroupName, discoveryGroupAddress, discoveryGroupPort, discoveryGroupRefreshTimeout);
 
       boolean created = server.createConnectionFactory(name,
@@ -302,7 +293,7 @@
                                                        retryIntervalMultiplier,                                                       
                                                        reconnectAttempts,
                                                        failoverOnNodeShutdown,
-                                                       bindings);
+                                                       Arrays.asList(jndiBindings));
       if (created)
       {
          sendNotification(NotificationType.CONNECTION_FACTORY_CREATED, name);

Modified: trunk/src/main/org/jboss/messaging/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -117,7 +117,7 @@
                                        final double retryIntervalMultiplier,
                                        final int reconnectAttempts,
                                        final boolean failoverOnServerShutdown,
-                                       final String jndiBinding) throws Exception
+                                       final String[] jndiBindings) throws Exception
    {
       replicationAwareInvoke("createSimpleConnectionFactory",
                              name,
@@ -144,7 +144,7 @@
                              retryIntervalMultiplier,
                              reconnectAttempts,
                              failoverOnServerShutdown,
-                             jndiBinding);
+                             jndiBindings);
    }
 
    public void createConnectionFactory(final String name,
@@ -171,7 +171,7 @@
                                        final double retryIntervalMultiplier,
                                        final int reconnectAttempts,
                                        final boolean failoverOnServerShutdown,
-                                       final String jndiBinding) throws Exception
+                                       final String[] jndiBindings) throws Exception
    {
       // FIXME need to store correctly the connector configs
       replicationAwareInvoke("createConnectionFactory",
@@ -199,7 +199,7 @@
                              retryIntervalMultiplier,
                              reconnectAttempts,
                              failoverOnServerShutdown,
-                             jndiBinding);
+                             jndiBindings);
    }
 
    public void createConnectionFactory(final String name,
@@ -230,7 +230,7 @@
                                        final double retryIntervalMultiplier,
                                        final int reconnectAttempts,
                                        final boolean failoverOnServerShutdown,
-                                       final String jndiBinding) throws Exception
+                                       final String[] jndiBindings) throws Exception
    {
       replicationAwareInvoke("createConnectionFactory",
                              name,
@@ -261,7 +261,7 @@
                              retryIntervalMultiplier,
                              reconnectAttempts,
                              failoverOnServerShutdown,
-                             jndiBinding);
+                             jndiBindings);
    }
 
    public boolean createQueue(final String name, final String jndiBinding) throws Exception

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControl2Test.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControl2Test.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControl2Test.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -89,90 +89,10 @@
       return server;
    }
 
-   private MessagingServer startMessagingServer(int discoveryPort) throws Exception
-   {
-      Configuration conf = new ConfigurationImpl();
-      conf.setSecurityEnabled(false);
-      conf.setJMXManagementEnabled(true);
-      conf.getDiscoveryGroupConfigurations()
-          .put("discovery",
-               new DiscoveryGroupConfiguration("discovery",
-                                               "localhost",
-                                               discoveryPort,
-                                               ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT));
-      MessagingServer server = Messaging.newMessagingServer(conf, mbeanServer, false);
-      server.start();
-
-      context = new InVMContext();
-      JMSServerManagerImpl serverManager = new JMSServerManagerImpl(server);
-      serverManager.start();
-      serverManager.setContext(context);
-
-      return server;
-   }
-
    // Constructors --------------------------------------------------
 
    // Public --------------------------------------------------------
 
-   public void _testCreateConnectionFactoryWithDiscoveryGroup() throws Exception
-   {
-      MessagingServer server = null;
-      try
-      {
-         String cfJNDIBinding = randomString();
-         String cfName = randomString();
-
-         server = startMessagingServer(8765);
-
-         checkNoBinding(context, cfJNDIBinding);
-
-         JMSServerControlMBean control = createManagementControl();
-         control.createConnectionFactory(cfName,
-                                         randomString(),
-                                         "localhost",
-                                         8765,
-                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
-                                         ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
-                                         ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
-                                         ClientSessionFactoryImpl.DEFAULT_PING_PERIOD,
-                                         ClientSessionFactoryImpl.DEFAULT_CONNECTION_TTL,
-                                         ClientSessionFactoryImpl.DEFAULT_CALL_TIMEOUT,
-                                         null,
-                                         ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
-                                         ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
-                                         ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE,
-                                         ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE,
-                                         ClientSessionFactoryImpl.DEFAULT_PRODUCER_WINDOW_SIZE,
-                                         ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE,
-                                         ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
-                                         ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE,
-                                         ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
-                                         ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND,
-                                         ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
-                                         ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS,
-                                         ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
-                                         ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL,
-                                         ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
-                                         DEFAULT_RECONNECT_ATTEMPTS,
-                                         DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
-                                         cfJNDIBinding);
-
-         Object o = checkBinding(context, cfJNDIBinding);
-         assertTrue(o instanceof ConnectionFactory);
-         ConnectionFactory cf = (ConnectionFactory)o;
-         Connection connection = cf.createConnection();
-         connection.close();
-      }
-      finally
-      {
-         if (server != null)
-         {
-            server.stop();
-         }
-      }
-   }
-
    public void testListClientConnectionsForInVM() throws Exception
    {
       doListClientConnections(InVMAcceptorFactory.class.getName(), InVMConnectorFactory.class.getName());

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlTest.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlTest.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -22,6 +22,8 @@
 
 package org.jboss.messaging.tests.integration.jms.server.management;
 
+import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN;
+import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_RECONNECT_ATTEMPTS;
 import static org.jboss.messaging.tests.util.RandomUtil.randomBoolean;
 import static org.jboss.messaging.tests.util.RandomUtil.randomDouble;
 import static org.jboss.messaging.tests.util.RandomUtil.randomPositiveInt;
@@ -36,6 +38,7 @@
 import org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl;
 import org.jboss.messaging.core.config.Configuration;
 import org.jboss.messaging.core.config.TransportConfiguration;
+import org.jboss.messaging.core.config.cluster.DiscoveryGroupConfiguration;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
 import org.jboss.messaging.core.logging.Logger;
 import org.jboss.messaging.core.management.ObjectNames;
@@ -51,7 +54,7 @@
 import org.jboss.messaging.tests.unit.util.InVMContext;
 
 /**
- * A QueueControlTest
+ * A JMSServerControlTest
  *
  * @author <a href="jmesnil at redhat.com">Jeff Mesnil</a>
  * 
@@ -230,7 +233,7 @@
 
    public void testCreateConnectionFactory_3() throws Exception
    {
-      String cfJNDIBinding = randomString();
+      String[] cfJNDIBindings = new String[] {randomString(), randomString(), randomString()} ;
       String cfName = randomString();
       long pingPeriod = randomPositiveLong();
       long connectionTTL = randomPositiveLong();
@@ -254,7 +257,10 @@
       boolean blockOnNonPersistentSend = randomBoolean();
       boolean blockOnPersistentSend = randomBoolean();
 
-      checkNoBinding(context, cfJNDIBinding);
+      for (String cfJNDIBinding : cfJNDIBindings)
+      {
+         checkNoBinding(context, cfJNDIBinding);         
+      }
       checkNoResource(ObjectNames.getConnectionFactoryObjectName(cfName));
 
       JMSServerControlMBean control = createManagementControl();
@@ -283,13 +289,16 @@
                                             retryIntervalMultiplier,
                                             reconnectAttempts,
                                             failoverOnServerShutdown,
-                                            cfJNDIBinding);
+                                            cfJNDIBindings);
 
-      Object o = checkBinding(context, cfJNDIBinding);
-      assertTrue(o instanceof ConnectionFactory);
-      ConnectionFactory cf = (ConnectionFactory)o;
-      Connection connection = cf.createConnection();
-      connection.close();
+      for (String cfJNDIBinding : cfJNDIBindings)
+      {
+         Object o = checkBinding(context, cfJNDIBinding);
+         assertTrue(o instanceof ConnectionFactory);
+         ConnectionFactory cf = (ConnectionFactory)o;
+         Connection connection = cf.createConnection();
+         connection.close();
+      }
 
       checkResource(ObjectNames.getConnectionFactoryObjectName(cfName));
       ConnectionFactoryControlMBean cfControl = ManagementControlHelper.createConnectionFactoryControl(cfName,
@@ -317,7 +326,71 @@
       assertEquals(blockOnNonPersistentSend, cfControl.isBlockOnNonPersistentSend());
       assertEquals(blockOnPersistentSend, cfControl.isBlockOnPersistentSend());
    }
+   
+   public void _testCreateConnectionFactoryWithDiscoveryGroup() throws Exception
+   {
+      MessagingServer server = null;
+      try
+      {
+         String[] cfJNDIBindings = new String[] {randomString(), randomString(), randomString()};
+         String cfName = randomString();
 
+         server = startMessagingServer(8765);
+
+         for (String cfJNDIBinding : cfJNDIBindings)
+         {
+            checkNoBinding(context, cfJNDIBinding);            
+         }
+
+         JMSServerControlMBean control = createManagementControl();
+         control.createConnectionFactory(cfName,
+                                         randomString(),
+                                         "231.7.7.7",
+                                         8765,
+                                         ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT,
+                                         ClientSessionFactoryImpl.DEFAULT_DISCOVERY_INITIAL_WAIT,
+                                         ClientSessionFactoryImpl.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
+                                         ClientSessionFactoryImpl.DEFAULT_PING_PERIOD,
+                                         ClientSessionFactoryImpl.DEFAULT_CONNECTION_TTL,
+                                         ClientSessionFactoryImpl.DEFAULT_CALL_TIMEOUT,
+                                         null,
+                                         ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
+                                         ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE,
+                                         ClientSessionFactoryImpl.DEFAULT_CONSUMER_WINDOW_SIZE,
+                                         ClientSessionFactoryImpl.DEFAULT_CONSUMER_MAX_RATE,
+                                         ClientSessionFactoryImpl.DEFAULT_PRODUCER_WINDOW_SIZE,
+                                         ClientSessionFactoryImpl.DEFAULT_PRODUCER_MAX_RATE,
+                                         ClientSessionFactoryImpl.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
+                                         ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE,
+                                         ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
+                                         ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND,
+                                         ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
+                                         ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS,
+                                         ClientSessionFactoryImpl.DEFAULT_PRE_ACKNOWLEDGE,
+                                         ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL,
+                                         ClientSessionFactoryImpl.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
+                                         DEFAULT_RECONNECT_ATTEMPTS,
+                                         DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN,
+                                         cfJNDIBindings);
+
+         for (String cfJNDIBinding : cfJNDIBindings)
+         {
+            Object o = checkBinding(context, cfJNDIBinding);
+            assertTrue(o instanceof ConnectionFactory);
+            ConnectionFactory cf = (ConnectionFactory)o;
+            Connection connection = cf.createConnection();
+            connection.close();
+         }
+      }
+      finally
+      {
+         if (server != null)
+         {
+            server.stop();
+         }
+      }
+   }
+
    public void testDestroyConnectionFactory() throws Exception
    {
       String cfJNDIBinding = randomString();
@@ -379,6 +452,29 @@
 
    // Private -------------------------------------------------------
 
+
+   private MessagingServer startMessagingServer(int discoveryPort) throws Exception
+   {
+      Configuration conf = new ConfigurationImpl();
+      conf.setSecurityEnabled(false);
+      conf.setJMXManagementEnabled(true);
+      conf.getDiscoveryGroupConfigurations()
+          .put("discovery",
+               new DiscoveryGroupConfiguration("discovery",
+                                               "231.7.7.7",
+                                               discoveryPort,
+                                               ConfigurationImpl.DEFAULT_BROADCAST_REFRESH_TIMEOUT));
+      MessagingServer server = Messaging.newMessagingServer(conf, mbeanServer, false);
+      server.start();
+
+      context = new InVMContext();
+      JMSServerManagerImpl serverManager = new JMSServerManagerImpl(server);
+      serverManager.start();
+      serverManager.setContext(context);
+
+      return server;
+   }
+   
    // Inner classes -------------------------------------------------
 
 }
\ No newline at end of file

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java	2009-04-23 12:02:57 UTC (rev 6537)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java	2009-04-23 12:30:50 UTC (rev 6538)
@@ -150,7 +150,7 @@
                                                    final double retryIntervalMultiplier,
                                                    final int reconnectAttempts,
                                                    final boolean failoverOnServerShutdown,
-                                                   final String jndiBinding) throws Exception
+                                                   final String[] jndiBindings) throws Exception
          {
             proxy.invokeOperation("createSimpleConnectionFactory",
                                  name,
@@ -177,7 +177,7 @@
                                  retryIntervalMultiplier,
                                  reconnectAttempts,
                                  failoverOnServerShutdown,
-                                 jndiBinding);
+                                 jndiBindings);
          }
 
          public void createConnectionFactory(final String name,
@@ -204,7 +204,7 @@
                                              final double retryIntervalMultiplier,
                                              final int reconnectAttempts,
                                              final boolean failoverOnServerShutdown,
-                                             final String jndiBinding) throws Exception
+                                             final String[] jndiBindings) throws Exception
          {
             proxy.invokeOperation("createConnectionFactory",
                                  name,
@@ -231,7 +231,7 @@
                                  retryIntervalMultiplier,
                                  reconnectAttempts,
                                  failoverOnServerShutdown,
-                                 jndiBinding);
+                                 jndiBindings);
          }
 
          public void createConnectionFactory(final String name,
@@ -262,7 +262,7 @@
                                              final double retryIntervalMultiplier,
                                              final int reconnectAttempts,
                                              final boolean failoverOnServerShutdown,
-                                             final String jndiBinding) throws Exception
+                                             final String[] jndiBindings) throws Exception
          {
             proxy.invokeOperation("createConnectionFactory",
                                  name,
@@ -293,7 +293,7 @@
                                  retryIntervalMultiplier,
                                  reconnectAttempts,
                                  failoverOnServerShutdown,
-                                 jndiBinding);
+                                 jndiBindings);
          }
 
          public boolean createQueue(final String name, final String jndiBinding) throws Exception




More information about the jboss-cvs-commits mailing list