Author: clebert.suconic(a)jboss.com
Date: 2012-01-04 08:26:24 -0500 (Wed, 04 Jan 2012)
New Revision: 11960
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
Log:
JBPAPP-7844
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-01-04
12:38:50 UTC (rev 11959)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-01-04
13:26:24 UTC (rev 11960)
@@ -1146,8 +1146,15 @@
}
}
+ HashMap<String, String> metaDataToSend;
+
+ synchronized (metadata)
+ {
+ metaDataToSend = new HashMap<String, String>(metadata);
+ }
+
// Resetting the metadata after failover
- for (Map.Entry<String, String> entries : metadata.entrySet())
+ for (Map.Entry<String, String> entries : metaDataToSend.entrySet())
{
sendPacketWithoutLock(new SessionAddMetaDataMessageV2(entries.getKey(),
entries.getValue(), false));
}