[hornetq-commits] JBoss hornetq SVN: r10302 - in branches/Branch_2_2_EAP: src/main/org/hornetq/core/cluster/impl and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 7 17:29:15 EST 2011


Author: clebert.suconic at jboss.com
Date: 2011-03-07 17:29:14 -0500 (Mon, 07 Mar 2011)
New Revision: 10302

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java
   branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/discovery/DiscoveryTest.java
Log:
tweaks

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2011-03-07 20:17:08 UTC (rev 10301)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java	2011-03-07 22:29:14 UTC (rev 10302)
@@ -332,8 +332,7 @@
                                                     lbAddress,
                                                     groupAddress,
                                                     discoveryGroupConfiguration.getGroupPort(),
-                                                    discoveryGroupConfiguration.getRefreshTimeout(),
-                                                    globalThreadPool);
+                                                    discoveryGroupConfiguration.getRefreshTimeout());
 
             discoveryGroup.registerListener(this);
 

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java	2011-03-07 20:17:08 UTC (rev 10301)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java	2011-03-07 22:29:14 UTC (rev 10302)
@@ -36,7 +36,6 @@
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.server.management.Notification;
 import org.hornetq.core.server.management.NotificationService;
-import org.hornetq.utils.Future;
 import org.hornetq.utils.TypedProperties;
 
 /**
@@ -83,15 +82,12 @@
 
    private NotificationService notificationService;
 
-   private final ExecutorService globalThreadPool;
-
    public DiscoveryGroupImpl(final String nodeID,
                              final String name,
                              final InetAddress localBindAddress,
                              final InetAddress groupAddress,
                              final int groupPort,
-                             final long timeout,
-                             ExecutorService globalThreadPool) throws Exception
+                             final long timeout) throws Exception
    {
       this.nodeID = nodeID;
 
@@ -104,8 +100,6 @@
       this.groupAddress = groupAddress;
 
       this.groupPort = groupPort;
-
-      this.globalThreadPool = globalThreadPool;
    }
 
    public void setNotificationService(final NotificationService notificationService)

Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/discovery/DiscoveryTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/discovery/DiscoveryTest.java	2011-03-07 20:17:08 UTC (rev 10301)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/discovery/DiscoveryTest.java	2011-03-07 22:29:14 UTC (rev 10302)
@@ -92,8 +92,7 @@
                                                  null,
                                                  groupAddress,
                                                  groupPort,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       dg.start();
 
@@ -179,8 +178,7 @@
                                                  localAddress,
                                                  groupAddress,
                                                  groupPort,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       dg.start();
 
@@ -227,8 +225,7 @@
                                                  null,
                                                  groupAddress,
                                                  groupPort,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       dg.start();
 
@@ -286,8 +283,7 @@
 
       bg.addConnector(live1);
 
-      DiscoveryGroup dg = new DiscoveryGroupImpl(nodeID, RandomUtil.randomString(), null, groupAddress, groupPort, timeout,
-                                                 Executors.newFixedThreadPool(1));
+      DiscoveryGroup dg = new DiscoveryGroupImpl(nodeID, RandomUtil.randomString(), null, groupAddress, groupPort, timeout);
 
       dg.start();
 
@@ -378,8 +374,7 @@
                                                  null,
                                                  groupAddress,
                                                  port2,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       dg.start();
 
@@ -422,8 +417,7 @@
                                                  null,
                                                  groupAddress2,
                                                  port2,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       dg.start();
 
@@ -503,8 +497,7 @@
                                                   null,
                                                   groupAddress1,
                                                   groupPort1,
-                                                  timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                  timeout);
       dg1.start();
 
       DiscoveryGroup dg2 = new DiscoveryGroupImpl("group-2::" + RandomUtil.randomString(),
@@ -512,8 +505,7 @@
                                                   null,
                                                   groupAddress2,
                                                   groupPort2,
-                                                  timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                  timeout);
       dg2.start();
 
       DiscoveryGroup dg3 = new DiscoveryGroupImpl("group-3::" + RandomUtil.randomString(),
@@ -521,8 +513,7 @@
                                                   null,
                                                   groupAddress3,
                                                   groupPort3,
-                                                  timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                  timeout);
       dg3.start();
 
       bg1.broadcastConnectors();
@@ -629,8 +620,7 @@
                                                  null,
                                                  groupAddress,
                                                  groupPort,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       MyListener listener1 = new MyListener();
       MyListener listener2 = new MyListener();
@@ -719,8 +709,7 @@
                                                  null,
                                                  groupAddress,
                                                  groupPort,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
 
       MyListener listener1 = new MyListener();
       dg.registerListener(listener1);
@@ -886,24 +875,21 @@
                                                   null,
                                                   groupAddress,
                                                   groupPort,
-                                                  timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                  timeout);
 
       DiscoveryGroup dg2 = new DiscoveryGroupImpl(RandomUtil.randomString(),
                                                   RandomUtil.randomString(),
                                                   null,
                                                   groupAddress,
                                                   groupPort,
-                                                  timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                  timeout);
 
       DiscoveryGroup dg3 = new DiscoveryGroupImpl(RandomUtil.randomString(),
                                                   RandomUtil.randomString(),
                                                   null,
                                                   groupAddress,
                                                   groupPort,
-                                                  timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                  timeout);
 
       dg1.start();
       dg2.start();
@@ -948,8 +934,7 @@
                                                  null,
                                                  groupAddress,
                                                  groupPort,
-                                                 timeout,
-                                                 Executors.newFixedThreadPool(1));
+                                                 timeout);
       dg.setNotificationService(notifService);
 
       Assert.assertEquals(0, notifListener.getNotifications().size());



More information about the hornetq-commits mailing list