CamelContext is started twice when using camel-blueprint
--------------------------------------------------------
Key: CAMEL-3425
URL: https://issues.apache.org/jira/browse/CAMEL-3425
Project: Camel
Issue Type: Bug
Components: camel-blueprint
Affects Versions: 2.6.0
Reporter: Claus Ibsen
Assignee: Guillaume Nodet
Priority: Critical
Fix For: 2.6.0
For example if you run the {{testRouteWithAllComponents}} test in
{{CamelBlueprintTest}} in tests/camel-itest-osgi you will see _a lot_ of
logging. But notice
{code}
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext
- Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) is starting
[RMI TCP Connection(1)-10.0.1.2] INFO org.apache.camel.impl.DefaultCamelContext
- Apache Camel 2.6-SNAPSHOT (CamelContext: 67-camel-2) started in 0.144 seconds
{code}
Then blueprint does something
{code}
[Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache
Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) is starting
[Blueprint Extender: 3] INFO org.apache.camel.impl.DefaultCamelContext - Apache
Camel 2.6-SNAPSHOT (CamelContext: 4-camel-5) started in 0.067 seconds
{code}
And likewise both CamelContext's is shutdown when the test completes. There are
logging events for that as well.
Pay attention to the name of the 1st CamelContext {{67-camel-2}}. This is the
*correct* name as its based on the bundle id, our end user Camel application is
given. This ensures that the CamelContext from his application has a name which
is unique and refers to the bundle id as well.
Now if you look at the 2nd CamelContext being started its given another name
{{4-camel-5}}. That id is most likely using a shared bundle id with a low
number. For example camel-blueprint or camel-core bundle, or something like
that.
In essence camel-blueprint should only create *one* CamelContext and it should
use the {{67-camel-2}} as the name of the CamelContext (eg. include the bundle
id of the end user application).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.