[hornetq-commits] JBoss hornetq SVN: r11254 - in branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core: management/impl and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Aug 31 00:39:29 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-08-31 00:39:28 -0400 (Wed, 31 Aug 2011)
New Revision: 11254

Modified:
   branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
   branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java
   branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/ClusterConnection.java
   branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
tweaks

Modified: branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java	2011-08-31 02:54:36 UTC (rev 11253)
+++ branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java	2011-08-31 04:39:28 UTC (rev 11254)
@@ -1449,7 +1449,6 @@
 
             if (nodeID != null)
             {
-               // TODO: calculate the time of node down
                serverLocator.notifyNodeDown(System.currentTimeMillis(), msg.getNodeID().toString());
             }
 

Modified: branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java	2011-08-31 02:54:36 UTC (rev 11253)
+++ branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java	2011-08-31 04:39:28 UTC (rev 11254)
@@ -242,6 +242,7 @@
       try
       {
          clusterConnection.start();
+         clusterConnection.flushExecutor();
       }
       finally
       {
@@ -255,6 +256,7 @@
       try
       {
          clusterConnection.stop();
+         clusterConnection.flushExecutor();
       }
       finally
       {

Modified: branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/ClusterConnection.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/ClusterConnection.java	2011-08-31 02:54:36 UTC (rev 11253)
+++ branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/ClusterConnection.java	2011-08-31 04:39:28 UTC (rev 11254)
@@ -46,6 +46,8 @@
    void activate() throws Exception;
    
    TransportConfiguration getConnector();
+   
+   void flushExecutor();
 
    // for debug
    String describe();

Modified: branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java	2011-08-31 02:54:36 UTC (rev 11253)
+++ branches/Branch_2_2_EAP_cluster_clean3/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java	2011-08-31 04:39:28 UTC (rev 11254)
@@ -336,8 +336,6 @@
 
    public void start() throws Exception
    {
-      flushExecutor();
-      
       synchronized (this)
       {
          if (started)
@@ -355,6 +353,16 @@
       }
 
    }
+   
+   public void flushExecutor()
+   {
+      Future future = new Future();
+      executor.execute(future);
+      if (!future.await(10000))
+      {
+         server.threadDump("Couldn't finish executor on " + this);
+      }
+   }
 
    public void stop() throws Exception
    {
@@ -362,8 +370,6 @@
       {
          return;
       }
-      
-      flushExecutor();
 
       if (log.isDebugEnabled())
       {
@@ -1367,16 +1373,6 @@
 
       return str.toString();
    }
-   
-   private void flushExecutor()
-   {
-      Future future = new Future();
-      executor.execute(future);
-      if (!future.await(10000))
-      {
-         server.threadDump("Couldn't finish executor on " + this);
-      }
-   }
 
    interface ClusterConnector
    {



More information about the hornetq-commits mailing list