mirror of https://github.com/apache/activemq.git
use the subscription name in the object key of a durable subscription so that it is more unique so that the MBeanTest can pass.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@453075 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
09ebb720d3
commit
44aece5020
|
@ -26,6 +26,7 @@ import java.util.List;
|
|||
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.OpenDataException;
|
|||
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.ServiceStopper;
|
|||
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 @@ public class ManagedRegionBroker extends RegionBroker {
|
|||
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 @@ public class ManagedRegionBroker extends RegionBroker {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue