[ 
https://issues.apache.org/activemq/browse/CAMEL-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43531#action_43531
 ] 

William Tam commented on CAMEL-613:
-----------------------------------

I can take care of the jira, too.

The current implementation is limited to one agent per CamelContext.  Notice a 
bug in the following code that findMBeanServer() always returns empty list 
because the find method is searching by mbean server id (not default domain 
name).   Once we address that we can share agent among CamelContext.  The 
CamelNamingStrategy already supports naming mbeans from different CamelContexts 
to be registered with an agent.  . 

 // jmx is enabled but there's no MBeanServer, so create one
            List servers = MBeanServerFactory.findMBeanServer(jmxDomainName);
            if (servers.size() == 0) {
                server = MBeanServerFactory.createMBeanServer(jmxDomainName);
            } else {
                server = (MBeanServer)servers.get(0);
            }

Also, multiple agents can be attached to a connector server by registering the 
connector server (itself a mbean) to the agents.

Even we say we enable jmx by default, I am not sure we should create a 
connector server by default.  The reason is that applications may already have 
a connector server in the VM (like the above use case of Camel in ServiceMix 
deployment).  Also, it increases the chances of port conflict as it tries to 
grab 1099.   I think by default, Camel should create or find an agent and 
register all camel mbeans.   The user can then configures to attach to a 
connector server or create a new one.



> Change the JMX default connetor's URL to avoid the confilict with the 
> ActiveMQ or ServiceMix JMX default connector 
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-613
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-613
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: jmx
>    Affects Versions: 1.3.0
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 1.4.0
>
>
> Since the Camel default JMX connector's URL is same with ActiveMQ and 
> ServiceMix default JMX Connector URL,  we need to change it to avoid the 
> conflict.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to