[
https://issues.apache.org/jira/browse/BROOKLYN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14228607#comment-14228607
]
ASF GitHub Bot commented on BROOKLYN-92:
----------------------------------------
Github user hzbarcea commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/359#discussion_r21048177
--- Diff:
software/messaging/src/main/java/brooklyn/entity/messaging/activemq/ActiveMQDestinationImpl.java
---
@@ -52,4 +57,12 @@ public void onManagementStarting() {
protected void disconnectSensors() {
if (jmxFeed != null) jmxFeed.stop();
}
+
+ protected String getBrokerName() {
+ if (brokerName == null) {
+ EntityLocal parent = (EntityLocal)getParent();
+ brokerName = parent != null ?
parent.getAttribute(ActiveMQBroker.BROKER_NAME) : null;
--- End diff --
It should not, but coding errors could lead to NPEs if the wiring is not
done right. Refactored the code to simplify as you suggest but added another
check that would throw a more meaninful message than an NPE>
> Support for customized brokerName for ActiveMQ
> ----------------------------------------------
>
> Key: BROOKLYN-92
> URL: https://issues.apache.org/jira/browse/BROOKLYN-92
> Project: Brooklyn
> Issue Type: Improvement
> Reporter: Hadrian Zbarcea
> Fix For: 0.7.0-M2
>
>
> Mandatory feature for more complex topologies, like networks of brokers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)