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:
Hiram R. Chirino 2006-10-05 00:58:59 +00:00
parent 09ebb720d3
commit 44aece5020
1 changed files with 7 additions and 4 deletions

View File

@ -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";
if (sub.getConsumerInfo().isDurable()) {
persistentMode = "Durable, subscriptionID=" + JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getSubcriptionName());
} else {
persistentMode = "Non-Durable";
}