protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info, Subscription subscription) { try { ConsumerInfo offlineConsumerInfo = subscription != null ? subscription.getConsumerInfo() : ((TopicRegion)getTopicRegion()).createInactiveConsumerInfo(info); ObjectName objectName = BrokerMBeanSupport.createSubscriptionName(brokerObjectName, info.getClientId(), offlineConsumerInfo); SubscriptionView view = new InactiveDurableSubscriptionView(this, brokerService, key.getClientId(), info, subscription); try { if (AsyncAnnotatedMBean.registerMBean(asyncInvokeService, mbeanTimeout, managementContext, view, objectName) != null) { registeredMBeans.add(objectName); } } catch (Throwable e) { LOG.warn("Failed to register MBean {}", key); LOG.debug("Failure reason: ", e); } inactiveDurableTopicSubscribers.put(objectName, view); subscriptionKeys.put(key, objectName); } catch (Exception e) { LOG.error("Failed to register subscription {}", info, e); } }
@Override public String toString() { return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
public String toString() { return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); } }
protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info) { Hashtable map = brokerObjectName.getKeyPropertyList(); try { ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName=" + map.get("BrokerName") + "," + "Type=Subscription," + "active=false," + "name=" + JMXSupport.encodeObjectNamePart(key.toString()) + ""); SubscriptionView view = new InactiveDurableSubscriptionView(this, key.getClientId(), info); try { AnnotatedMBean.registerMBean(managementContext, view, objectName); registeredMBeans.add(objectName); } catch (Throwable e) { LOG.warn("Failed to register MBean: " + key); LOG.debug("Failure reason: " + e, e); } inactiveDurableTopicSubscribers.put(objectName, view); subscriptionKeys.put(key, objectName); } catch (Exception e) { LOG.error("Failed to register subscription " + info, e); } }
@Override public String toString() { return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info, Subscription subscription) { try { ConsumerInfo offlineConsumerInfo = subscription != null ? subscription.getConsumerInfo() : ((TopicRegion)getTopicRegion()).createInactiveConsumerInfo(info); ObjectName objectName = BrokerMBeanSupport.createSubscriptionName(brokerObjectName, info.getClientId(), offlineConsumerInfo); SubscriptionView view = new InactiveDurableSubscriptionView(this, brokerService, key.getClientId(), info, subscription); try { AsyncAnnotatedMBean.registerMBean(asyncInvokeService, mbeanTimeout, managementContext, view, objectName); registeredMBeans.add(objectName); } catch (Throwable e) { LOG.warn("Failed to register MBean {}", key); LOG.debug("Failure reason: ", e); } inactiveDurableTopicSubscribers.put(objectName, view); subscriptionKeys.put(key, objectName); } catch (Exception e) { LOG.error("Failed to register subscription {}", info, e); } }
@Override public String toString() { return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info, Subscription subscription) { try { ConsumerInfo offlineConsumerInfo = subscription != null ? subscription.getConsumerInfo() : ((TopicRegion)getTopicRegion()).createInactiveConsumerInfo(info); ObjectName objectName = BrokerMBeanSupport.createSubscriptionName(brokerObjectName, info.getClientId(), offlineConsumerInfo); SubscriptionView view = new InactiveDurableSubscriptionView(this, brokerService, key.getClientId(), info, subscription); try { AsyncAnnotatedMBean.registerMBean(asyncInvokeService, mbeanTimeout, managementContext, view, objectName); registeredMBeans.add(objectName); } catch (Throwable e) { LOG.warn("Failed to register MBean {}", key); LOG.debug("Failure reason: ", e); } inactiveDurableTopicSubscribers.put(objectName, view); subscriptionKeys.put(key, objectName); } catch (Exception e) { LOG.error("Failed to register subscription {}", info, e); } }
@Override public String toString() { return "InactiveDurableSubscriptionView: " + getClientId() + ":" + getSubscriptionName(); }
protected void addInactiveSubscription(SubscriptionKey key, SubscriptionInfo info, Subscription subscription) { try { ConsumerInfo offlineConsumerInfo = subscription != null ? subscription.getConsumerInfo() : ((TopicRegion)getTopicRegion()).createInactiveConsumerInfo(info); ObjectName objectName = BrokerMBeanSupport.createSubscriptionName(brokerObjectName, info.getClientId(), offlineConsumerInfo); SubscriptionView view = new InactiveDurableSubscriptionView(this, brokerService, key.getClientId(), info, subscription); try { AsyncAnnotatedMBean.registerMBean(asyncInvokeService, mbeanTimeout, managementContext, view, objectName); registeredMBeans.add(objectName); } catch (Throwable e) { LOG.warn("Failed to register MBean {}", key); LOG.debug("Failure reason: ", e); } inactiveDurableTopicSubscribers.put(objectName, view); subscriptionKeys.put(key, objectName); } catch (Exception e) { LOG.error("Failed to register subscription {}", info, e); } }