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;
}
Show replies by date