[ https://issues.apache.org/activemq/browse/AMQ-1089?page=all ]
Jonas Lim updated AMQ-1089:
---------------------------
Fix Version/s: 4.1.1
4.1.2
Description:
When using a transportconnector with a multicast discoveryagent a warning is
shown.
config: <transportConnector name="default" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
WARN MulticastDiscoveryAgent -brokerName not set
When the transportconnector is started the MulticastDiscoveryAgent is created
if it does not exist,
but the brokerName for this MulticastDiscoveryAgent is not set by the
transportconnector.
See the code and the suggested modification to prevent this warning:
org.apache.activemq.broker.TransportConnector.java
<snip>
public void start() throws Exception {
getServer().start();
DiscoveryAgent da = getDiscoveryAgent();
if( da!=null ) {
da.registerService(getConnectUri().toString());
//suggested modification start
if(da.getBrokerName() == null || da.getBrokerName().length == 0) {
da.setBrokerName(this.getBroker().getBrokerName());
}
//suggested modification end
da.start();
}
this.statusDector.start();
log.info("Connector "+getName()+" Started");
}
<snap>
was:
When using a transportconnector with a multicast discoveryagent a warning is
shown.
config: <transportConnector name="default" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
WARN MulticastDiscoveryAgent -brokerName not set
This warning is generated by the MulticastDiscoveryAgent.start() method.
When the transportconnector is started the MulticastDiscoveryAgent is created
if it does not exist,
but the brokerName for this MulticastDiscoveryAgent is not set by the
transportconnector.
See the code and the suggested modification to prevent this warning:
org.apache.activemq.broker.TransportConnector.java
<snip>
public void start() throws Exception {
getServer().start();
DiscoveryAgent da = getDiscoveryAgent();
if( da!=null ) {
da.registerService(getConnectUri().toString());
//suggested modification start
if(da.getBrokerName() == null || da.getBrokerName().length == 0) {
da.setBrokerName(this.getBroker().getBrokerName());
}
//suggested modification end
da.start();
}
this.statusDector.start();
log.info("Connector "+getName()+" Started");
}
<snap>
btw, this issue has also been resolved in the 4.1.0 release
> Warning when using multicast discoveryUri
> ------------------------------------------
>
> Key: AMQ-1089
> URL: https://issues.apache.org/activemq/browse/AMQ-1089
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 4.0.1, 4.0.2
> Environment: reproduced on Windows XP Pro and SuSE Linux Enterprise
> 9.1
> Reporter: Olaf Brandt
> Priority: Minor
> Fix For: 4.2.0, 4.1.1, 4.1.2
>
>
> When using a transportconnector with a multicast discoveryagent a warning is
> shown.
> config: <transportConnector name="default" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
> WARN MulticastDiscoveryAgent -brokerName not set
> When the transportconnector is started the MulticastDiscoveryAgent is created
> if it does not exist,
> but the brokerName for this MulticastDiscoveryAgent is not set by the
> transportconnector.
> See the code and the suggested modification to prevent this warning:
> org.apache.activemq.broker.TransportConnector.java
> <snip>
> public void start() throws Exception {
> getServer().start();
> DiscoveryAgent da = getDiscoveryAgent();
> if( da!=null ) {
> da.registerService(getConnectUri().toString());
> //suggested modification start
> if(da.getBrokerName() == null || da.getBrokerName().length == 0) {
> da.setBrokerName(this.getBroker().getBrokerName());
> }
> //suggested modification end
> da.start();
> }
> this.statusDector.start();
> log.info("Connector "+getName()+" Started");
> }
> <snap>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira