Hi Charles and all the Camel users,

More than an answer to Charles, this mail also starts a point on Camel integration in OSGi.

I'm actually developping such a thing on a JOnAS 5.1 application server, which rely on a Felix OSGi gateway. I'm also using a 1.5.0 version of camel, and a 2.1.3 version of CXF (and it's actually a bundle ;)).

I did have some improvement to do on Camel (exposes it as an OSGi service using iPOJO, redefines how to lookup converters in packages, and some other stuffs, a complete point on this to come ...) I'm providing my project some integration tests to validate my work, and then propose it to the Camel community.

However, you can browse my sources at this address : svn//svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas5 <svn://svn.forge.objectweb.org/svnroot/jonas/sandbox/camel-jonas5>

for your problem, i didn't have any of them, as both camel modules and CXF are provided as bundles. The only problem i had is for CXF bundle which doesn't import the Jetty classes if you need to expose web services from simple POJO, using the front end API of CXF. A way to expose your packages you need to be exposed as an OSGi bundle is to build your own bundle with those packages embedded and exported. Moreover, you have to avoid cycled dependencies.

Regards,

Guillaume

cmoulliard a écrit :
Hi,

I would like to know what is the best/quickest way to design OSGI
librairies/bundles for a project ?

First of all, let's start with a example : camel + cxf

To deploy such a project top of SMX kernel 1.x, I need of course to create
an osgi project for my code. This project can be created using mvn archetype
(maven-felix-plugin), bnd or pax-contruct

my.company.osgi.camel.cxf

Let's says that this osgi bundle depends on :

camel-core 2.0-SNAPSHOT,
camel-spring 2.0-SNAPSHOT,
camel-cxf 2.0-SNAPSHOT

Those dependencies already exist as OSGI bundles (thanks for Camel team), so
I can install them easily in SMX Kernel 1.x

But these dependencies depends on additional jars which are potentially not
at all 'OSGI'fied like  org.apache.cxf.* (2.2-SNAPSHOT). Moreover, apache
cxf depends on another jars.

Questions :

- How can I easily/quickly detect which jars are not 'osgi'fied' to avoid to
iterate through cycles of deployment, looking in the log and discovering
that dependencies are unresolved ?
- What is the best strategy to OSGIfied them ? I mean 'use by example the
option 'embed-transitive' of bnd tools (which is used by maven-felix-plugin
or pax-constrcut)'. But the risk is that too much jars are embedded in my
osgi bundle or wrapped separetely

Regards,


-----
Charles Moulliard
SOA Architect

My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/


--
Guillaume Renault - BULL Service
BULL - Architect of an Open World
Email : guillaume.rena...@bull.net
Tel : +334 76 29 71 09
Office : B1-295
Web : http://jasmine.ow2.org
web : http://jonas.ow2.org
(\ _ /)
(='.'=)
(")-(")

Reply via email to