Skip to content

OsgiDefaultCamelContext calls init() rather than build() in ctor, preventing adding routes #567

Open
@paul-mcculloch

Description

@paul-mcculloch

[Originally logged as https://issues.apache.org/jira/browse/CAMEL-20184 but closed with instructions to log here]

The call to init() was added in 3.1 (and is still present in 4.8.1) with the comment "OsgiDefaultCamelContext should init like camel-blueprint does" (apache/camel@a1c4b82)

At that time that was the case. However in 3.2 the Blueprint context was changed to use build() (bb1f504)

No equaivalent change was made to OsgiDefaultCamelContext.

The symptoms are that routes dont't get added to the context in some circumstances. In my case I was trying to use a local copy of https://github.com/apache/camel/blob/camel-2.x/components/camel-scr/src/main/java/org/apache/camel/scr/AbstractCamelRunner.java too migrate a 2.x project to 3.x.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions