Hi,

My previous conclusion was not correct.
The Camel initialization happens indeed in the "addingBundle" method, but is
called from a SynchronousBundleListener, in the same thread that activates
the bundle, and there is only one thread ("FelixStartlevel") that activates
all feature bundles, so it should it should fully initialized.

However, when the problem happens, the following error is logged : 
2012-01-19 09:35:41,655 | INFO  | ExtenderThread-5 |  |
CamelNamespaceHandler            | OSGi environment not detected.

This can happen if the OSGi activator of the bundle "camel-spring" was not
executed before the Camel context is starting.  In SMX 4.4, camel-spring is
at start-level 50, and applications are at start-level 60, so the activator
is meant to be completed before applications are starting.

However, during the first start-up, or when the bundle cache is cleaned up,
the bundles delivered as Karaf "features" are installed in parallel with the
deployment of applications in the "deploy" directory.  This can explain that
the camel-spring (not yet installed at level 50) is executed after some
applications are starting.

The only solution I can think of is that the bundle cache should be built in
a first phase, then the bundle are started in a second phase.

Regards,

metatech




metatech wrote
> 
> However, the Camel initialization is not finished yet, it is performed in
> the "addingBundle" method, which registers Camel components, languages,
> type converters, ...
> 


--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-under-OSGi-without-Spring-et-al-tp4507473p5157820.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to