[hornetq-commits] JBoss hornetq SVN: r8394 - in trunk/src/main/org/hornetq/core: remoting/impl and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Nov 24 13:08:58 EST 2009


Author: clebert.suconic at jboss.com
Date: 2009-11-24 13:08:58 -0500 (Tue, 24 Nov 2009)
New Revision: 8394

Modified:
   trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java
   trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java
   trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
   trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
Tweaks and Making sure GroupingFailoverTest will not fail

Modified: trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java
===================================================================
--- trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java	2009-11-24 15:35:18 UTC (rev 8393)
+++ trunk/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java	2009-11-24 18:08:58 UTC (rev 8394)
@@ -134,6 +134,16 @@
    {
       super.close();
       
+      if (maxIOSemaphore != null)
+      {
+         while (!maxIOSemaphore.tryAcquire(maxIO, 60, TimeUnit.SECONDS))
+         {
+            log.warn("Couldn't get lock after 60 seconds on closing AsynchronousFileImpl::" + this.getFileName());
+         }
+      }
+      
+      maxIOSemaphore = null;
+
       if (channel != null)
       {
          channel.close();
@@ -148,16 +158,6 @@
 
       rfile = null;
 
-      if (maxIOSemaphore != null)
-      {
-         while (!maxIOSemaphore.tryAcquire(maxIO, 60, TimeUnit.SECONDS))
-         {
-            log.warn("Couldn't get lock after 60 seconds on closing AsynchronousFileImpl::" + this.getFileName());
-         }
-      }
-      
-      maxIOSemaphore = null;
-
       notifyAll();
    }
 

Modified: trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java	2009-11-24 15:35:18 UTC (rev 8393)
+++ trunk/src/main/org/hornetq/core/remoting/impl/RemotingConnectionImpl.java	2009-11-24 18:08:58 UTC (rev 8394)
@@ -243,8 +243,6 @@
 
       log.warn("Connection failure has been detected: " + me.getMessage() + " [code=" + me.getCode() + "]");
 
-      System.out.println("Fail on RemotingConnectio");
-      
       // Then call the listeners
       callFailureListeners(me);
 
@@ -401,7 +399,6 @@
 
       for (final FailureListener listener : listenersClone)
       {
-         System.out.println("Calling failure listener: " + listener.getClass().getName());
          try
          {
             listener.connectionFailed(me);

Modified: trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java	2009-11-24 15:35:18 UTC (rev 8393)
+++ trunk/src/main/org/hornetq/core/replication/impl/ReplicationManagerImpl.java	2009-11-24 18:08:58 UTC (rev 8394)
@@ -371,7 +371,14 @@
       while (!pendingTokens.isEmpty())
       {
          OperationContext ctx = pendingTokens.poll();
-         ctx.replicationDone();
+         try
+         {
+            ctx.replicationDone();
+         }
+         catch (Throwable e)
+         {
+            log.warn("Error completing callback on replication manager", e);
+         }
       }
 
       if (replicatingChannel != null)

Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2009-11-24 15:35:18 UTC (rev 8393)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java	2009-11-24 18:08:58 UTC (rev 8394)
@@ -381,6 +381,12 @@
             storageManager.stop();
          }
 
+         if (replicationManager != null)
+         {
+            replicationManager.stop();
+            replicationManager = null;
+         }
+
          if (replicationEndpoint != null)
          {
             replicationEndpoint.stop();
@@ -417,12 +423,6 @@
             log.debug("Waiting for " + task);
          }
          
-         if (replicationManager != null)
-         {
-            replicationManager.stop();
-            replicationManager = null;
-         }
-
          threadPool.shutdown();
 
          scheduledPool = null;



More information about the hornetq-commits mailing list