protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception { queueSubscribers.remove(key); topicSubscribers.remove(key); temporaryQueueSubscribers.remove(key); temporaryTopicSubscribers.remove(key); if (registeredMBeans.remove(key)) { try { managementContext.unregisterMBean(key); } catch (Throwable e) { LOG.warn("Failed to unregister MBean {}", key); LOG.debug("Failure reason: ", e); } } DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key); if (view != null) { // need to put this back in the inactive list SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName()); if (addToInactive) { SubscriptionInfo info = new SubscriptionInfo(); info.setClientId(subscriptionKey.getClientId()); info.setSubscriptionName(subscriptionKey.getSubscriptionName()); info.setDestination(new ActiveMQTopic(view.getDestinationName())); info.setSelector(view.getSelector()); addInactiveSubscription(subscriptionKey, info, (brokerService.isKeepDurableSubsActive() ? view.subscription : null)); } } }
public String toString() { return "ActiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception { queueSubscribers.remove(key); topicSubscribers.remove(key); temporaryQueueSubscribers.remove(key); temporaryTopicSubscribers.remove(key); if (registeredMBeans.remove(key)) { try { managementContext.unregisterMBean(key); } catch (Throwable e) { LOG.warn("Failed to unregister MBean: " + key); LOG.debug("Failure reason: " + e, e); } } DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key); if (view != null) { // need to put this back in the inactive list SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName()); if (addToInactive) { SubscriptionInfo info = new SubscriptionInfo(); info.setClientId(subscriptionKey.getClientId()); info.setSubscriptionName(subscriptionKey.getSubscriptionName()); info.setDestination(new ActiveMQTopic(view.getDestinationName())); addInactiveSubscription(subscriptionKey, info); } } }
String userName = brokerService.isPopulateUserNameInMBeans() ? context.getUserName() : null; if (sub.getConsumerInfo().isDurable()) { view = new DurableSubscriptionView(this, brokerService, context.getClientId(), userName, sub); } else { if (sub instanceof TopicSubscription) {
public String toString() { return "ActiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
} else { if (sub.getConsumerInfo().isDurable()) { view = new DurableSubscriptionView(this, context.getClientId(), sub); } else { if (sub instanceof TopicSubscription) {
protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception { queueSubscribers.remove(key); topicSubscribers.remove(key); temporaryQueueSubscribers.remove(key); temporaryTopicSubscribers.remove(key); if (registeredMBeans.remove(key)) { try { managementContext.unregisterMBean(key); } catch (Throwable e) { LOG.warn("Failed to unregister MBean {}", key); LOG.debug("Failure reason: ", e); } } DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key); if (view != null) { // need to put this back in the inactive list SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName()); if (addToInactive) { SubscriptionInfo info = new SubscriptionInfo(); info.setClientId(subscriptionKey.getClientId()); info.setSubscriptionName(subscriptionKey.getSubscriptionName()); info.setDestination(new ActiveMQTopic(view.getDestinationName())); info.setSelector(view.getSelector()); addInactiveSubscription(subscriptionKey, info, (brokerService.isKeepDurableSubsActive() ? view.subscription : null)); } } }
public String toString() { return "ActiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
String userName = brokerService.isPopulateUserNameInMBeans() ? context.getUserName() : null; if (sub.getConsumerInfo().isDurable()) { view = new DurableSubscriptionView(this, brokerService, context.getClientId(), userName, sub); } else { if (sub instanceof TopicSubscription) {
protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception { queueSubscribers.remove(key); topicSubscribers.remove(key); temporaryQueueSubscribers.remove(key); temporaryTopicSubscribers.remove(key); if (registeredMBeans.remove(key)) { try { managementContext.unregisterMBean(key); } catch (Throwable e) { LOG.warn("Failed to unregister MBean {}", key); LOG.debug("Failure reason: ", e); } } DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key); if (view != null) { // need to put this back in the inactive list SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName()); if (addToInactive) { SubscriptionInfo info = new SubscriptionInfo(); info.setClientId(subscriptionKey.getClientId()); info.setSubscriptionName(subscriptionKey.getSubscriptionName()); info.setDestination(new ActiveMQTopic(view.getDestinationName())); info.setSelector(view.getSelector()); addInactiveSubscription(subscriptionKey, info, (brokerService.isKeepDurableSubsActive() ? view.subscription : null)); } } }
public String toString() { return "ActiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
String userName = brokerService.isPopulateUserNameInMBeans() ? context.getUserName() : null; if (sub.getConsumerInfo().isDurable()) { view = new DurableSubscriptionView(this, brokerService, context.getClientId(), userName, sub); } else { if (sub instanceof TopicSubscription) {
protected void unregisterSubscription(ObjectName key, boolean addToInactive) throws Exception { queueSubscribers.remove(key); topicSubscribers.remove(key); temporaryQueueSubscribers.remove(key); temporaryTopicSubscribers.remove(key); if (registeredMBeans.remove(key)) { try { managementContext.unregisterMBean(key); } catch (Throwable e) { LOG.warn("Failed to unregister MBean {}", key); LOG.debug("Failure reason: ", e); } } DurableSubscriptionView view = (DurableSubscriptionView)durableTopicSubscribers.remove(key); if (view != null) { // need to put this back in the inactive list SubscriptionKey subscriptionKey = new SubscriptionKey(view.getClientId(), view.getSubscriptionName()); if (addToInactive) { SubscriptionInfo info = new SubscriptionInfo(); info.setClientId(subscriptionKey.getClientId()); info.setSubscriptionName(subscriptionKey.getSubscriptionName()); info.setDestination(new ActiveMQTopic(view.getDestinationName())); info.setSelector(view.getSelector()); addInactiveSubscription(subscriptionKey, info, (brokerService.isKeepDurableSubsActive() ? view.subscription : null)); } } }
public String toString() { return "ActiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
String userName = brokerService.isPopulateUserNameInMBeans() ? context.getUserName() : null; if (sub.getConsumerInfo().isDurable()) { view = new DurableSubscriptionView(this, brokerService, context.getClientId(), userName, sub); } else { if (sub instanceof TopicSubscription) {