Author: jmesnil
Date: 2010-07-19 09:37:15 -0400 (Mon, 19 Jul 2010)
New Revision: 9415
Modified:
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
Log:
HA refactoring
* in close(), copy the sessions set to prevent a ConcurrentModificationException
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-07-19
13:36:15 UTC (rev 9414)
+++
branches/2_2_0_HA_Improvements/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2010-07-19
13:37:15 UTC (rev 9415)
@@ -396,7 +396,8 @@
{
synchronized (failoverLock)
{
- for (ClientSession session : sessions)
+ // work on a copied set. the session will be removed from sessions when
session.close() is called
+ for (ClientSession session : new HashSet<ClientSession>(sessions))
{
try
{
Show replies by date