Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-534
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Rob Davies
Reporter: Torsten Mielke
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

ManagedTransportConnection - Failed to register MBean

Created: 24/Aug/09 03:17 PM   Updated: 24/Aug/09 03:49 PM
Component/s: broker
Affects Version/s: 5.3.0.2-fuse
Fix Version/s: None

File Attachments: 1. Zip Archive JUnitTestcase.zip (14 kB)

Environment: FUSE MB 5.3.0.2-fuse, multicast,


 Description  « Hide
Suppose two brokers each define two network connectors with a different name attribute (and also a different brokerName attribute) like in this example:
<networkConnector conduitSubscriptions="false"
                            brokerName="amq01.prod.1"
                            duplex="false"
                            networkTTL="5"
                            name="queue_grid"
                            dynamicOnly="false"
                            uri="multicast://239.255.2.3:6155"
                            decreaseNetworkConsumerPriority="false">
                <excludedDestinations>
                    <topic physicalName=">"/>
                </excludedDestinations>
                <staticallyIncludedDestinations>
                    <queue physicalName=">"/>
                </staticallyIncludedDestinations>
            </networkConnector>
            <networkConnector conduitSubscriptions="true"
                            brokerName="amq01.prod.2"
                            duplex="false"
                            networkTTL="5"
                            name="topic_grid"
                            dynamicOnly="false"
                            uri="multicast://239.255.2.3:6155"
                            decreaseNetworkConsumerPriority="false">
            </networkConnector>

The configuration is correct but it raises the following warning at runtime:

ManagedTransportConnection     - Failed to register MBean: 
org.apache.activemq:BrokerName=amq01.prod,Type=Connection,ConnectorName=tcp_//localhost_0,
Connection=NC_amq02.prod_outbound

in both brokers.
This is because each brokers network connector will be registered at the peer broker. However they both use the same MBean name although the network connector name attribute and brokerName attribute are unique.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Torsten Mielke added a comment - 24/Aug/09 03:22 PM
Discussed the problem with gtully and he suggested that the network connector name should be part of the mbean name that is being registered.

Also noticed that the brokerName attribute in the network connector config gets overridden with the brokerName of the <broker> config just before starting the network connector.

XBeanBrokerSevice.java
//around line 1895, method startAllConnectors
for (Iterator<NetworkConnector> iter = getNetworkConnectors().iterator(); iter.hasNext();) {
                NetworkConnector connector = iter.next();
                connector.setLocalUri(uri);
                connector.setBrokerName(getBrokerName());
                connector.setDurableDestinations(durableDestinations);
                connector.start();
            }

Torsten Mielke added a comment - 24/Aug/09 03:30 PM
Also, when stopping a broker, the unregistration of this mbean fails.

Torsten Mielke added a comment - 24/Aug/09 03:49 PM
Attaching JUnit testcase. It could be improved though.