You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/11/10 15:52:19 UTC

[jira] Commented: (CAMEL-3324) Camel should auto find free CamelContext MBean name when registering Camel in JMX to avoid failing on startup due existing mbean name

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

Claus Ibsen commented on CAMEL-3324:
------------------------------------

trunk: 1033501.

 OSGi will prepend the bundle id in the JMX name so they are nicely sorted by bundle id in the JMX consoles.

> Camel should auto find free CamelContext MBean name when registering Camel in JMX to avoid failing on startup due existing mbean name
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3324
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3324
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: osgi
>    Affects Versions: 2.5.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.6.0
>
>
> This makes it much easier when running multiple Camel applications in the same JVM. You may have assigned a duplicate name in the CamelContext but in different WARs / bundles etc. Then previously Camel would not be able to start the 2nd application as the 1st had already taking the MBean name.
> Instead Camel should auto remedy this by computing a free name to use instead.
> For example
> WAR-a
> {code:xml}
> <camelContext id="foo">
> ...
> </camelContext>
> {code}
> WAR-b
> {code:xml}
> <camelContext id="foo">
> ...
> </camelContext>
> {code}
> Now what happens is that
> {code}
> WAR-a : DEBUG Registered MBean with objectname: org.apache.camel:context=localhost/foo,type=context,name="foo"
> ...
> WAR-b: WARN This CamelContext(foo) will be registered using the name: foo-2 due to clash with an existing name already registered in MBeanServer.
> WAR-b DEBUG Registered MBean with objectname: org.apache.camel:context=localhost/foo-2,type=context,name="foo"
> {code}
> As you can see WAR-b has the MBean name reassigned to foo-2 to avoid the clash.

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