Paul McCulloch created CAMEL-20184:
--------------------------------------
Summary: OsgiDefaultCamelContext calls init() rather than build()
in ctor, preventing adding routes
Key: CAMEL-20184
URL: https://issues.apache.org/jira/browse/CAMEL-20184
Project: Camel
Issue Type: Bug
Components: camel-karaf
Affects Versions: 3.14.10
Reporter: Paul McCulloch
The call to init() was added in 3.1 with the comment "OsgiDefaultCamelContext
should init like camel-blueprint does"
(https://github.com/apache/camel/commit/a1c4b82a31108cd23409d0ee6ca4edc5b809b291)
At that time that was the case. However in 3.2 the Blueprint context was
changed to use build()
(https://github.com/apache/camel-karaf/commit/bb1f5042042fbb3e122cb533eddbc3207c3d8efe)
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.
I can probably create a simple test case to recreate if required.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)