Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE571819F for ; Wed, 7 Sep 2011 03:33:57 +0000 (UTC) Received: (qmail 81142 invoked by uid 500); 7 Sep 2011 03:33:54 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 80666 invoked by uid 500); 7 Sep 2011 03:33:45 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 80513 invoked by uid 99); 7 Sep 2011 03:33:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 03:33:37 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [204.152.97.1] (HELO mail.orb.org) (204.152.97.1) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 03:33:31 +0000 Received: from new-host.home (pool-108-46-128-137.nycmny.fios.verizon.net [108.46.128.137]) by mail.orb.org (Postfix) with ESMTP id BEE6A240D8 for ; Tue, 6 Sep 2011 23:33:09 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Apple Message framework v1250.2) Subject: Re: Getting an OSGi-based REST project started with Camel From: Brian Topping In-Reply-To: Date: Tue, 6 Sep 2011 23:33:09 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <15C1991A-BCCD-40F8-935A-D8604347E3AD@codehaus.org> References: <47F3B70F-4859-4D03-960B-3144647B9977@codehaus.org> <4E66C9B7.5000902@gmail.com> To: users@camel.apache.org X-Mailer: Apple Mail (2.1250.2) X-Virus-Checked: Checked by ClamAV on apache.org 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 Brian 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. >=20 > Freeman > On 2011-9-7, at =E4=B8=8A=E5=8D=889:32, Willem Jiang wrote: >=20 >> 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. >>=20 >> 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, >>>=20 >>> 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 leap. >>>=20 >>> 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. >>>=20 >>> 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. >>>=20 >>> 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. My current POM is attached below. >>>=20 >>> 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. >>>=20 >>> 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. >>>=20 >>> Kind regards, Brian >>=20 >>=20 >>=20 >> --=20 >> Willem >> ---------------------------------- >> FuseSource >> Web: http://www.fusesource.com >> Blog: http://willemjiang.blogspot.com (English) >> http://jnn.javaeye.com (Chinese) >> Twitter: willemjiang Weibo: willemjiang >=20 > --------------------------------------------- > Freeman Fang >=20 > FuseSource > Email:ffang@fusesource.com > Web: fusesource.com > Twitter: freemanfang > Blog: http://freemanfang.blogspot.com >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20