camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: OSGi Camel issue: org.apache.camel.core.osgi is private in camel-spring
Date Thu, 22 Jul 2010 00:38:08 GMT

Bryce Ewing wrote:
> Hi,
> In the upgrade from camel 2.2.0 to 2.4.0 there was a refactoring of OSGi
> support.  One change was the deprecating of the camel-osgi component in
> favor of camel-spring.  I am not using spring as such in my application
> (obviously certain parts do use it but it isn't a spring based application). 
> What I was using for the camel context was OsgiDefaultCamelContext which is
> within the camel-core-osgi module.
> This module is embedded into the camel-spring component but the
> org.apache.camel.core.osgi is set as a private package and therefore the
> class is no longer available at run time.

Because camel-spring and camel-blueprint embed the same camel-core-osgi, 
so this package org.apache.camel.core.osgi had to be private, and they 
are just for internal using.
> To get around this I have also embedded this module into the bundle that I
> am creating the camel context within.  This doesn't seem right to me, either
> the OsgiDefaultCamelContext should no longer be used and I am just going
> about things in the wrong way, or the package shouldn't be private.

I think you should use the CamelContextFactoryBean in the camel-spring 
module to create the CamelContext instead of using the 
OsigDefaultCamelContext directly.

> Cheers
> Bryce

Apache Camel, Apache CXF committer
Open Source Integration

View raw message