[ 
https://issues.apache.org/activemq/browse/CAMEL-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Siegfried Wirth updated CAMEL-1612:
-----------------------------------

    Attachment: jconsoletwocontexts.png
                applicationContext.xml

Added a simple example demonstrating the issue. Use the attached 
applicationContext.xml as configuration for camel and start a jconsole. (To see 
the route working create a file /tmp/file1.txt which will be renamed to 
file2.txt by one route and named back to file1.txt by the other route.)

Using jconsole the result looks like shown in jconsoletwocontexts.png: You can 
observe that the endpoints for one context are not assigned to the correct 
context.

Further investigation does indicate it is not a problem with the jmx support, 
but with the order of creating, starting and initializing contexts and endpoint.

> Endpoint are not assigned to correct contexts
> ---------------------------------------------
>
>                 Key: CAMEL-1612
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1612
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M1
>         Environment: Java 1.6, Spring 2.5.6
>            Reporter: Siegfried Wirth
>         Attachments: applicationContext.xml, jconsoletwocontexts.png
>
>
> When defining routes in two camel contexts the endpoints are not correctly 
> assigned to the contexts. The bug can easily be observed by using jconsole / 
> jmx. For one camel context the endpoints are not registered.
> From debugging up to InstrumentationLifecycleStrategy#onEndpointAdd(Endpoint) 
> it looks like the order of starting contexts and registering endpoints is 
> wrong. (Camel tries to add endpoints with this method to one context before 
> (initialized) and so the endpoints are not really added. It looks like the 
> reason for this is in the order of initializing contexts and 
> routes/endpoints.)
> See also discussion 
> http://www.nabble.com/Two-camel-contexts-and-assinging-endpoints-(visible-by-jconsole%2C-jmx)-td23520282.html.

-- 
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