activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r414595 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
Date Thu, 15 Jun 2006 14:34:09 GMT
Author: chirino
Date: Thu Jun 15 07:34:08 2006
New Revision: 414595

URL: http://svn.apache.org/viewvc?rev=414595&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQ-749

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java?rev=414595&r1=414594&r2=414595&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/ConnectionDotFileInterceptor.java
Thu Jun 15 07:34:08 2006
@@ -15,10 +15,21 @@
  */
 package org.apache.activemq.broker.view;
 
+import java.io.PrintWriter;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
 import org.apache.activemq.broker.Broker;
-import org.apache.activemq.broker.Connection;
 import org.apache.activemq.broker.ConnectionContext;
-import org.apache.activemq.broker.Connector;
 import org.apache.activemq.broker.jmx.BrokerViewMBean;
 import org.apache.activemq.broker.jmx.ManagementContext;
 import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
@@ -28,18 +39,8 @@
 import org.apache.activemq.command.Message;
 import org.apache.activemq.command.ProducerId;
 import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.filter.DestinationMap;
 import org.apache.activemq.filter.DestinationMapNode;
 
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import java.io.PrintWriter;
-import java.util.*;
-
 /**
  * 
  * @version $Revision: $
@@ -153,11 +154,13 @@
     }
 
     protected void printProducers(PrintWriter writer, Map clients, Map queues, Map topics)
{
-        for (Iterator iter = producerDestinations.entrySet().iterator(); iter.hasNext();)
{
-            Map.Entry entry = (Map.Entry) iter.next();
-            ProducerId producerId = (ProducerId) entry.getKey();
-            Set destinationSet = (Set) entry.getValue();
-            printProducers(writer, clients, queues, topics, producerId, destinationSet);
+        synchronized(lock) {
+            for (Iterator iter = producerDestinations.entrySet().iterator(); iter.hasNext();)
{
+                Map.Entry entry = (Map.Entry) iter.next();
+                ProducerId producerId = (ProducerId) entry.getKey();
+                Set destinationSet = (Set) entry.getValue();
+                printProducers(writer, clients, queues, topics, producerId, destinationSet);
+            }
         }
     }
 



Mime
View raw message