Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8BFA3200B63 for ; Mon, 15 Aug 2016 19:30:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8AB03160AA7; Mon, 15 Aug 2016 17:30:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 811DD160A8A for ; Mon, 15 Aug 2016 19:30:19 +0200 (CEST) Received: (qmail 86483 invoked by uid 500); 15 Aug 2016 17:30:18 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 86473 invoked by uid 99); 15 Aug 2016 17:30:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2016 17:30:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3A1C4C000A for ; Mon, 15 Aug 2016 17:30:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.843 X-Spam-Level: ** X-Spam-Status: No, score=2.843 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id hTgX_295PgpB for ; Mon, 15 Aug 2016 17:30:14 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1A0675FACE for ; Mon, 15 Aug 2016 17:30:14 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id f65so100559316wmi.0 for ; Mon, 15 Aug 2016 10:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=rX74jXbjaeQEGTpnYfTQ9daL7De/htcXuVekYK2Ect8=; b=GtQ24nH40onHTU8Blor+KGK0SweSmG8uftiAZKPM93LOGM3hBcbCakBc2ZWth7osEO 4wmyw+8hVcLvaEBnZzCbx/4DLAWqzMJuZj+IVgC8O178XkZtDBZ6fnxEPMmWBN8XZtsc TDB41T2D1SMJh5YFc2Hu5RfVMK1xBMnJXjIqrP7ghQszYWQYcUGbfge/qEwE2pTnuLW5 wALyX1W/uvfgBaQEoYvnIk6nS17vPDCP8qK1x9PEq1AbbovkjVu7jucgp89K7J8I1ccK UYOYBiLhrde0Wr4nm77q6Jzzkd3vTlzHZjOO/Gnby35dJNq2YHYOPUY2elJdVLwIL74w vIlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=rX74jXbjaeQEGTpnYfTQ9daL7De/htcXuVekYK2Ect8=; b=lNCuwbigbOG+qhjj9fMUGErvR0GvlIEpcMgpycJcJX+yYztAbU/RQceGyzwoHCb2yr 091yJEPGAKBZd2CuQ1/OOFFCvQSGoC7wBVzZJS+BL8mIStfI8xHLUL88Fb+1o8TZzq8L ss0PcmT7vVKcGM3LZLTk4XBlDohJI4jY3HG/8J9Un2TPnSq6vo1g/OPLCgofcuXhF1iO NNy93wsKdnRCXOUfVEShYExwrZeucSuBmruemsEdWxStVMYjC3FEEnBOUA0OkRoiV0Vz pQNKi00kiTKU0T0ahJQpnfQ57T0Z2NoACsT3ALr2VWiZBPz7Y6G4Su/eGoEpiXBiFAqT IUoQ== X-Gm-Message-State: AEkoouum3sEZinmSO7uwP8w8s546KWJMz8MV0mcf3LMSne5lkY8jd8ORjq54cMoiQTWHj7y7+VtTc/xuJ82ljw== X-Received: by 10.25.24.233 with SMTP id 102mr4143522lfy.187.1471282212774; Mon, 15 Aug 2016 10:30:12 -0700 (PDT) MIME-Version: 1.0 Sender: cschneider111@gmail.com Received: by 10.25.34.214 with HTTP; Mon, 15 Aug 2016 10:30:12 -0700 (PDT) In-Reply-To: References: <1471274502582-4047529.post@n3.nabble.com> <4b06eb12-34e5-60bd-46a4-7f2102201cbd@composent.com> <3E1B2ECC-A219-48E1-AEF0-4A5B6F8BB41A@gmail.com> From: Christian Schneider Date: Mon, 15 Aug 2016 19:30:12 +0200 X-Google-Sender-Auth: XtwBdHXo-q8Azx6q6w37M0-a2KM Message-ID: Subject: Re: RESTful web service in Karaf using CXF and blueprint To: user@karaf.apache.org Content-Type: multipart/alternative; boundary=001a114113c6a8297a053a1f95f3 archived-at: Mon, 15 Aug 2016 17:30:20 -0000 --001a114113c6a8297a053a1f95f3 Content-Type: text/plain; charset=UTF-8 Hi Benson, would be great to get some feedback about your experiences using dOSGi. As we are approaching the 2.0 version now is the best time to get important features in. Christian 2016-08-15 19:24 GMT+02:00 Benson Margulies : > Correct. I tried the dOSGi stuff, and it wasn't really ready to do > what I needed to do. > > On Mon, Aug 15, 2016 at 1:17 PM, David Jencks > wrote: > > Just to see if I understand what you are doing, this approach does not > involve the osgi service registry in any way for the REST service > implementation object? You are directly registering the component instance > with CXF, and there is no need for it to expose any service interfaces at > all? > > > > thanks > > david jencks > > > >> On Aug 15, 2016, at 10:10 AM, Benson Margulies > wrote: > >> > >> I do this by making DS @Activate methods call the CXF API to publish > >> REST services. > >> > >> > >> On Mon, Aug 15, 2016 at 1:08 PM, Scott Lewis > wrote: > >>> Hi Marc, > >>> > >>> The OSGi Remote Services specification (and the associated Remote > Service > >>> Admin sepc) defines a standardized way to export OSGi services for > remote > >>> access. The specification is defined in a way that allows the use of > >>> arbitrary distribution providers that are responsible for making the > OSGi > >>> service accessible from outside of the OSGi process. > >>> > >>> ECF [1] has an implementation of these specs that supports many > distribution > >>> providers [2], including two that I'm working on now that supports any > >>> Jax-RS implementation (i.e. both CXF and Jersey). These two > distribution > >>> providers are here [3] and I'm finalizing them for an initial release. > >>> Note that for these providers, in addition to specifying jax-rs > resources > >>> via OSGi services, the jax-rs configuration (e.g. > MessageBodyReader/Writers, > >>> Features, etc) can also be specified via OSGi services. > >>> > >>> Scott > >>> > >>> [1] https://wiki.eclipse.org/ECF > >>> [2] https://wiki.eclipse.org/Distribution_Providers > >>> [3] https://github.com/ECF/JaxRSProviders > >>> > >>> On 8/15/2016 8:21 AM, Marc Durand wrote: > >>>> > >>>> Hello, > >>>> I was following Christian's tutorial here: > >>>> > >>>> http://liquid-reality.de/display/liquid/2011/12/22/ > Karaf+Tutorial+Part+4+-+CXF+Services+in+OSGi > >>>> > >>>> And I also found come blog posts from JB that show how to deploy > RESTful > >>>> services using blueprint. > >>>> > >>>> What I couldn't find was an example on how to deploy a RESTful service > >>>> where > >>>> the resource class is an OSGi service (to take advantage of SCR > references > >>>> to other services in the resource class). I was able to do it by > using a > >>>> element instead of a element in the blueprint > file. Is > >>>> this approach correct or will it lead to other problems down the road? > >>>> > >>>> Thanks! > >>>> Marc > >>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> View this message in context: > >>>> http://karaf.922171.n3.nabble.com/RESTful-web-service-in- > Karaf-using-CXF-and-blueprint-tp4047529.html > >>>> Sent from the Karaf - User mailing list archive at Nabble.com. > >>> > >>> > >>> > > > -- -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com --001a114113c6a8297a053a1f95f3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Benson,

would be great to get some f= eedback about your experiences using dOSGi. As we are approaching the 2.0 v= ersion now is the best time to get important features in.

Christian

2016-08-15 19:24 GMT+02:00 Benson Margulies &= lt;benson@basiste= ch.com>:
Correct. I tried t= he dOSGi stuff, and it wasn't really ready to do
what I needed to do.

On Mon, Aug 15, 2016 at 1:17 PM, David Jencks <david.a.jencks@gmail.com> wrote:
> Just to see if I understand what you are doing, this approach does not= involve the osgi service registry in any way for the REST service implemen= tation object?=C2=A0 You are directly registering the component instance wi= th CXF, and there is no need for it to expose any service interfaces at all= ?
>
> thanks
> david jencks
>
>> On Aug 15, 2016, at 10:10 AM, Benson Margulies <benson@basistech.com> wrote:
>>
>> I do this by making DS @Activate methods call the CXF API to publi= sh
>> REST services.
>>
>>
>> On Mon, Aug 15, 2016 at 1:08 PM, Scott Lewis <slewis@composent.com> wrote:
>>> Hi Marc,
>>>
>>> The OSGi Remote Services specification (and the associated Rem= ote Service
>>> Admin sepc) defines a standardized way to export OSGi services= for remote
>>> access.=C2=A0 =C2=A0The specification is defined in a way that= allows the use of
>>> arbitrary distribution providers that are responsible for maki= ng the OSGi
>>> service accessible from outside of the OSGi process.
>>>
>>> ECF [1] has an implementation of these specs that supports man= y distribution
>>> providers [2], including two that I'm working on now that = supports any
>>> Jax-RS implementation (i.e. both CXF and Jersey).=C2=A0 =C2=A0= These two distribution
>>> providers are here [3] and I'm finalizing them for an init= ial release.
>>> Note that for these providers, in addition to specifying jax-r= s resources
>>> via OSGi services, the jax-rs configuration (e.g. MessageBodyR= eader/Writers,
>>> Features, etc) can also be specified via OSGi services.
>>>
>>> Scott
>>>
>>> [1] https://wiki.eclipse.org/ECF
>>> [2] https://wiki.eclipse.org/Distri= bution_Providers
>>> [3] https://github.com/ECF/JaxRSProviders=
>>>
>>> On 8/15/2016 8:21 AM, Marc Durand wrote:
>>>>
>>>> Hello,
>>>> I was following Christian's tutorial here:
>>>>
>>>> http://liquid-reality.de/display/liquid/2011/12/22/Ka= raf+Tutorial+Part+4+-+CXF+Services+in+OSGi
>>>>
>>>> And I also found come blog posts from JB that show how to = deploy RESTful
>>>> services using blueprint.
>>>>
>>>> What I couldn't find was an example on how to deploy a= RESTful service
>>>> where
>>>> the resource class is an OSGi service (to take advantage o= f SCR references
>>>> to other services in the resource class).=C2=A0 I was able= to do it by using a
>>>> <reference> element instead of a <bean> elemen= t in the blueprint file.=C2=A0 Is
>>>> this approach correct or will it lead to other problems do= wn the road?
>>>>
>>>> Thanks!
>>>> Marc
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://karaf.922171.n3.nabble.com/RESTful-web-servic= e-in-Karaf-using-CXF-and-blueprint-tp4047529.html
>>>> Sent from the Karaf - User mailing list archive at Nabble.= com.
>>>
>>>
>>>
>



--
=
--
Christian Schneider
= http://www.liquid-reality.de

Open Source Architect
http://= www.talend.com
--001a114113c6a8297a053a1f95f3--