camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Topping <>
Subject Re: Getting an OSGi-based REST project started with Camel
Date Wed, 07 Sep 2011 03:33:09 GMT
Thanks guys, this is really great information!  :-)

I looked at SMX a number of times but kept considering the whole JBI thing as a bit of complexity
I didn't need to get involved in.  After the experience today and hearing your experience,
it seems clear that the extra effort of learning to work in SMX may take a little longer,
but the time saved in not messing around with the problems that have already been solved will
make it the shortest path over time.

Again, thanks for setting me straight here, cheers


On Sep 6, 2011, at 9:41 PM, Freeman Fang wrote:

> Yeah, using Apache Servicemix is a better choice. Apache Servicemix basically is an OSGi
container but support Cxf, Camel , Activemq, JBI, etc out of the box.
> It can save you lots of effort,  we have a cxf-jaxrs example shipped with kit which you
may need take a look.
> Btw, you should avoid using embeded jar in your customer bundle, it's not a good practice
in OSGi container. All necessary packages should be from the bundles installed in OSGi container.
> Freeman
> On 2011-9-7, at 上午9:32, Willem Jiang wrote:
>> There are some package and bundle hacking if you want to install the CXF bundle with
Karaf or Felix from scratch.
>> You can try to use the Servicemix which ships lots bundles to support the CXF out
of box.
>> BTW, apache CXF has it's own feature file that you can take it as an example to resolve
the module dependency.
>> On Wed Sep  7 06:37:26 2011, Brian Topping wrote:
>>> Greetings,
>>> I'm interested in working with Camel under OSGi.  I have previous experience
with EIP and OSGi and have read the very good Camel In Action, so this seems like a reasonable
>>> Over the weekend, spent some time trying some different components out.  My base
deployment is Felix 3.2.3 (or Karaf, although it's not currently supported by the IDE plugin
I'm using), and created some small projects over the weekend with spring-dm extender.
>>> My next project was an attempt to get JAXRS REST working via CXF and Jersey.
 It doesn't seem like it should be that difficult, but I spent much of the day resolving dependencies
on CXF and still am not finished.  It feels like I must be doing things the hard way, so I
was hoping others here might be able to offer some hints.
>>> When adding the large modules, I'd get a lot of transitive dependencies into
the build, which I would selectively add (i.e. without Spring v. 2.5.6.SEC artifacts) to the
set that was getting deployed.  That was simple enough, but then I started to realize some
of the core XML transitives were not being added, like stax and bind.  I ended up so far with
a combination of adding sun.misc to org.osgi.framework.system.packages.extra and wsdl4j and
xml-resolver in<Embed-Dependency>. My current POM is attached below.
>>> Where I'm at now is a missing dep on javax.enterprise.context, which just seems
like a bunch more Glassfish dependencies that are going to need to be added to the POM, loaded
into the Felix plugin I'm using and Felix restarted, one dependency at a time.
>>> Is there a better way to do this?  I realize this won't need to be done again,
but if there's an easier way to do this, I was hoping to learn some better technique sooner
than later.
>>> Kind regards, Brian
>> -- 
>> Willem
>> ----------------------------------
>> FuseSource
>> Web:
>> Blog: (English)
>> (Chinese)
>> Twitter: willemjiang Weibo: willemjiang
> ---------------------------------------------
> Freeman Fang
> FuseSource
> Web:
> Twitter: freemanfang
> Blog:

View raw message