activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r453075 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
Date Thu, 05 Oct 2006 00:59:00 GMT
Author: chirino
Date: Wed Oct  4 17:58:59 2006
New Revision: 453075

URL: http://svn.apache.org/viewvc?view=rev&rev=453075
Log:
use the subscription name in the object key of a durable subscription so that it is more unique
so that the MBeanTest can pass.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java?view=diff&rev=453075&r1=453074&r2=453075
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java
Wed Oct  4 17:58:59 2006
@@ -26,6 +26,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.Map.Entry;
+
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
@@ -37,6 +38,7 @@
 import javax.management.openmbean.TabularData;
 import javax.management.openmbean.TabularDataSupport;
 import javax.management.openmbean.TabularType;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.ConnectionContext;
@@ -67,6 +69,7 @@
 import org.apache.activemq.util.SubscriptionKey;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
 import edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArraySet;
 
@@ -175,9 +178,9 @@
         String destinationName = "";
         String clientID = "";
         SubscriptionKey key = new SubscriptionKey(context.getClientId(), sub.getConsumerInfo().getSubcriptionName());
+        
         if (sub.getConsumerInfo().isDurable()) {
-            persistentMode = "Durable";
-
+            persistentMode = "Durable, subscriptionID=" + JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getSubcriptionName());
         } else {
             persistentMode = "Non-Durable";
         }
@@ -187,8 +190,8 @@
         clientID = context.getClientId();
 
         try {
-            ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName="
+ map.get("BrokerName")
-                    + "," + "Type=Subscription, persistentMode=" + persistentMode + ", destinationType="
+ destinationType + " ,destinationName=" + JMXSupport.encodeObjectNamePart(destinationName)
+ " ,clientID=" + JMXSupport.encodeObjectNamePart(clientID) + "");
+        	ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName="
+ map.get("BrokerName")
+                        + "," + "Type=Subscription, persistentMode=" + persistentMode + ",
destinationType=" + destinationType + ", destinationName=" + JMXSupport.encodeObjectNamePart(destinationName)
+ ", clientID=" + JMXSupport.encodeObjectNamePart(clientID) + "");
             SubscriptionView view;
             if (sub.getConsumerInfo().isDurable()) {
                 view = new DurableSubscriptionView(this, context.getClientId(), sub);



Mime
View raw message