[hornetq-commits] JBoss hornetq SVN: r9731 - branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Sep 29 03:18:30 EDT 2010


Author: ataylor
Date: 2010-09-29 03:18:30 -0400 (Wed, 29 Sep 2010)
New Revision: 9731

Modified:
   branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
Log:
force connect loop to stop before closing sessions to avoid deadlock

Modified: branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java	2010-09-29 07:17:51 UTC (rev 9730)
+++ branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java	2010-09-29 07:18:30 UTC (rev 9731)
@@ -399,8 +399,11 @@
          return;
       }
 
+      
       synchronized (createSessionLock)
       {
+         //we need to stopthe factory from connecting if it is in the middle aof trying to failover before we get the lock
+         causeExit();
          synchronized (failoverLock)
          {
             // work on a copied set. the session will be removed from sessions when session.close() is called
@@ -420,8 +423,6 @@
          }
       }
 
-      causeExit();
-
       closed = true;
    }
    



More information about the hornetq-commits mailing list