From 79c9f2d01365794b93c8e4251b0f645b0b3e2c1f Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Thu, 18 Aug 2011 08:46:58 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-3459 - inactive durable subscriber view selector git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1159090 13f79535-47bb-0310-9956-ffa450edef68 --- .../broker/jmx/InactiveDurableSubscriptionView.java | 5 +++++ .../org/apache/activemq/broker/jmx/ManagedRegionBroker.java | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java index 5356e5f500..32daac3c3c 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/InactiveDurableSubscriptionView.java @@ -139,4 +139,9 @@ public class InactiveDurableSubscriptionView extends DurableSubscriptionView imp public String toString() { return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); } + + @Override + public String getSelector() { + return subscriptionInfo.getSelector(); + } } diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java index a2db3a600c..657f9f78c6 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagedRegionBroker.java @@ -196,7 +196,8 @@ public class ManagedRegionBroker extends RegionBroker { info.setClientId(context.getClientId()); info.setSubscriptionName(sub.getConsumerInfo().getSubscriptionName()); info.setDestination(sub.getConsumerInfo().getDestination()); - addInactiveSubscription(key, info, sub); + info.setSelector(sub.getSelector()); + addInactiveSubscription(key, info); } else { if (sub.getConsumerInfo().isDurable()) { view = new DurableSubscriptionView(this, context.getClientId(), sub); @@ -482,7 +483,8 @@ public class ManagedRegionBroker extends RegionBroker { info.setClientId(subscriptionKey.getClientId()); info.setSubscriptionName(subscriptionKey.getSubscriptionName()); info.setDestination(new ActiveMQTopic(view.getDestinationName())); - addInactiveSubscription(subscriptionKey, info, (brokerService.isKeepDurableSubsActive() ? view.subscription : null)); + info.setSelector(view.getSelector()); + addInactiveSubscription(subscriptionKey, info); } } }