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 39314185B3 for ; Sat, 27 Feb 2016 20:02:30 +0000 (UTC) Received: (qmail 983 invoked by uid 500); 27 Feb 2016 20:02:29 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 920 invoked by uid 500); 27 Feb 2016 20:02:29 -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 908 invoked by uid 99); 27 Feb 2016 20:02:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Feb 2016 20:02:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0D2BEC1891 for ; Sat, 27 Feb 2016 20:02:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.593 X-Spam-Level: X-Spam-Status: No, score=0.593 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pronoia-solutions-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id AQP591nWuv75 for ; Sat, 27 Feb 2016 20:02:27 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B59615F2C2 for ; Sat, 27 Feb 2016 20:02:26 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id m82so82328437oif.1 for ; Sat, 27 Feb 2016 12:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pronoia-solutions-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=J08wAv032RTyBfaN8R4HYQUEjciAy2+laGFL3z+rbrQ=; b=mXzwvSN3DFqw2R4ISqVCpXF0x0SZ8dpsoHkOB98jdOM8AguOouqnaXC2YGuaxggj+q DY5igP/VLJ2f4nl5i6vpui7PTw9iMJg6pjwc2Ch+KfCJEKBXsycRJUgTAKjJv3HGqBLx Ahmg4uBpL1JrSmaLoIcsvEv+a0DwTFWt2UYtZbrg22Cb69i9o1yFEmTIr7o/Rv632A1S p2w5D9Rww2lI4It3oft4eO+SdGMZD00cDU6f+bTzwl7p1WEi48omlR2xv+af6lG8F6db fC/zaalW8Z06ItcYDJsmThrVe2SWT+drSUyS2uf6u37i547smcSqLk2368jWyEPJBpha XGTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=J08wAv032RTyBfaN8R4HYQUEjciAy2+laGFL3z+rbrQ=; b=bRH1MwTcbb2KCRW0Z7LC1L82xD28PJNG5iPFdXKGA8/VvsMjVpVIiT9v3LhZEqvbK6 RnUrg2bbg8RbwuY3CL9wRGkYbBGWUlfTqHvbYMGwt6PhYDTxuzBxvs2i9JTC9YjQLc3j PHBJXcAwqH3OB4EhYH3zfSMEkfyc51vEyOH/QT9vjiRJxIYf+JUfCIuIN6IqciASL6+m svA4+zP2dGq1oRroNTBeOnJMaiyAtA6jhRSq0PLKf58cfznulFSiF37mzl3gsNCbJDbJ OLcS6mzLIx8E7C7jiGoFA0ZvfmBQuLvrD2BL7CjbCr8WtpT1EGYEQpcax1p12vs6C/V1 d8/g== X-Gm-Message-State: AD7BkJJa+khTRYaeXofY6+Hd3/1INaQUYbvtcJzQAuwmKnMr0R9uoK2IRR6PuGEjifrNCQ== X-Received: by 10.202.71.87 with SMTP id u84mr5994299oia.75.1456603340458; Sat, 27 Feb 2016 12:02:20 -0800 (PST) Received: from macpro.pronoia.local (c-24-10-239-245.hsd1.ut.comcast.net. [24.10.239.245]) by smtp.gmail.com with ESMTPSA id y196sm12586443oia.24.2016.02.27.12.02.19 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 27 Feb 2016 12:02:19 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: ServiceFactory From: Quinn Stevenson In-Reply-To: Date: Sat, 27 Feb 2016 13:02:14 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1456521821859-5778336.post@n5.nabble.com> <610CB59C-7D76-4321-BE67-CB7DDCFCB9E3@pronoia-solutions.com> To: users@camel.apache.org X-Mailer: Apple Mail (2.3112) I=E2=80=99m pretty sure that=E2=80=99s how the Blueprint proxy works. You can use Blueprint to reference services exposed via pure OSGi, = Declarative Services and Blueprint - all of them are proxied. So the = proxy would have to be on the caller, not the server. You may be able to do what you=E2=80=99re after by registering a factory = as a service, and then calling a method on your factory to return the = object you want - just a thought. > On Feb 27, 2016, at 12:56 PM, Brad Johnson = wrote: >=20 > Your observation about the caller being the proxied side is = interesting. I > hadn't really thought about it before. Conceptually I'd always = assumed > that it would be the registration that would proxy the > interface/implementation and that whomever grabbed got that. When the > service would change then the proxy could stay the same but the = internally > delegated class would be different. Interesting. >=20 > On Sat, Feb 27, 2016 at 1:30 PM, Brad Johnson = > wrote: >=20 >> I think you're right from what I'm seeing. I'll probably have to = resort >> to an Activator and register the service. I'm just making this so = that I >> can change the cfg file and switch the internal implementation = between >> three different types: test, impl, or remote. Test just serves up = dummy >> data, impl is what it sound like and remote is an implementation with = a >> ProducerTemplate that in turn delegates calls to URIs for easy >> distribution. >>=20 >> I can make that easy enough if I just use a Class.forName on a passed = in >> String and delegate to it but I'm trying to color within the lines. >>=20 >> On Sat, Feb 27, 2016 at 1:18 PM, Quinn Stevenson < >> quinn@pronoia-solutions.com> wrote: >>=20 >>> I don=E2=80=99t believe the way the service is exposed has any = bearing on when a >>> proxy is created - the proxy is created by the ,= not the >>> >>>=20 >>> Also, if you=E2=80=99re trying to achieve a service with the = properties of an >>> OSGi Service Factory (i.e. one service instance per calling bundle), = I >>> don=E2=80=99t think what you have will work - you=E2=80=99ll wind up = with a single instance >>> of the service in the container. See this JIRA for a little more = info as >>> to why. https://issues.apache.org/jira/browse/KARAF-4284 >>> >>>=20 >>> >>>> On Feb 26, 2016, at 2:35 PM, Brad Johnson = >>> wrote: >>>>=20 >>>> Just a quick follow up to that question, the class is not proxied = in >>> CBTS >>>> but that may be an impedance mismatch between the test harness and = an >>>> actual OSGi container and not indicative of how it will be handled = by >>>> blueprint in Karaf. >>>>=20 >>>> On Fri, Feb 26, 2016 at 3:23 PM, Ranx = >>> wrote: >>>>=20 >>>>> If I create a service factory instantiated in blueprint like this: >>>>>=20 >>>>> >>>> factory-method=3D"createService" > >>>>> >>>>>=20 >>>>> >>>>> >>>>>=20 >>>>> And inside the factory just do a Class.forName to instantiate and >>> return >>>>> it, >>>>> will the service reference itself be proxied? >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>> -- >>>>> View this message in context: >>>>> http://camel.465427.n5.nabble.com/ServiceFactory-tp5778336.html >>>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>>>=20 >>>=20 >>>=20 >>=20