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 5A21B1859B for ; Sat, 27 Feb 2016 19:56:21 +0000 (UTC) Received: (qmail 96265 invoked by uid 500); 27 Feb 2016 19:56:08 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 96204 invoked by uid 500); 27 Feb 2016 19:56:08 -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 96183 invoked by uid 99); 27 Feb 2016 19:56:07 -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; Sat, 27 Feb 2016 19:56:07 +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 6956BC0719 for ; Sat, 27 Feb 2016 19:56:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.593 X-Spam-Level: ** X-Spam-Status: No, score=2.593 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, 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: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mediadriver-com.20150623.gappssmtp.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 96SGFq7S5Uu5 for ; Sat, 27 Feb 2016 19:56:05 +0000 (UTC) Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 80E7D5F2C2 for ; Sat, 27 Feb 2016 19:56:05 +0000 (UTC) Received: by mail-qk0-f199.google.com with SMTP id x1so193880650qkc.1 for ; Sat, 27 Feb 2016 11:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mediadriver-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=8XhpjopYNZTOAtskmtj1lBLGshHS//+7E+gpQly2zNg=; b=P9FM98R8prHH5C/JpTeDvoFBptCCWaV5fTyiLnJBKwGa97DVLHXI5TIHk0eRxd92EE yhVRQ939XEoJqat2BAo4bVFxdEvnjGnoWFeOgF8PY4n2t48LNyux+CqzW7T3AQ7ubI1m 6U8rQyHxu0Q57HX+9kdUu7wxhUkSWs9IEiyPAKczUFHAr7hiyq3PG7WOz7GNAVy+vS9z cf/uS+IJB9c1vq7/d7s+7t8qyw0iP8guJ/iden7hgc6tv1J35H+8bDNpEO/oYRouASOe rmbXtiK4BuZUuThUwMQDCYqHfnAxYQ6iDbKywvJe9pcchzWF69qODE4So4hRWmw0KKT8 ZIjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=8XhpjopYNZTOAtskmtj1lBLGshHS//+7E+gpQly2zNg=; b=GAR77P2k+gj02m10tmzdkn6iY2Sc0ReuE1OgJhd1gg03rbI1Fj3YTcwtRRylx+8Ur6 bY8gdewJvH5VX63959dFZAhFZ5xMcWiDpPslTrSw0FIajnfinp5AiRtGrxGjDsflz1L1 j6j46mjtglezG4AXJbEUbsmW0aypZHfQmdJEYwG+nFHTWDr9lQZKo0NI2dVFJgvm0iQT 3aBcVMGsg1g8Z5xqsBaHB4xMK3RGwqVqy9zfe9pMe3frEt7o9mILa1ctjB5Y/8rE5orC MM+I9F3dN+bM8EoT0/tT59vrxxRbBpDlAGMa8b5NZ+PXLmO8lVx4ksY1FznWxt/13l7v ct6g== X-Gm-Message-State: AD7BkJK/gohFXg1zLCGZV5cbiTPRQofdB8uXYcSrXTzRI2uyfzoP++3/TdKnSVTsIED2j31HMSw4SrsQTRH+bdvO MIME-Version: 1.0 X-Received: by 10.55.76.11 with SMTP id z11mr9977853qka.83.1456602965016; Sat, 27 Feb 2016 11:56:05 -0800 (PST) Received: by 10.55.19.99 with HTTP; Sat, 27 Feb 2016 11:56:04 -0800 (PST) In-Reply-To: References: <1456521821859-5778336.post@n5.nabble.com> <610CB59C-7D76-4321-BE67-CB7DDCFCB9E3@pronoia-solutions.com> Date: Sat, 27 Feb 2016 13:56:04 -0600 Message-ID: Subject: Re: ServiceFactory From: Brad Johnson To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a114a85244f19e2052cc5ce2c --001a114a85244f19e2052cc5ce2c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. On Sat, Feb 27, 2016 at 1:30 PM, Brad Johnson wrote: > 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. > > 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. > > On Sat, Feb 27, 2016 at 1:18 PM, Quinn Stevenson < > quinn@pronoia-solutions.com> wrote: > >> I don=E2=80=99t believe the way the service is exposed has any bearing o= n when a >> proxy is created - the proxy is created by the , n= ot the >> >> >> 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 wit= h a single instance >> of the service in the container. See this JIRA for a little more info a= s >> to why. https://issues.apache.org/jira/browse/KARAF-4284 >> >> >> >> > On Feb 26, 2016, at 2:35 PM, Brad Johnson >> wrote: >> > >> > 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. >> > >> > On Fri, Feb 26, 2016 at 3:23 PM, Ranx >> wrote: >> > >> >> If I create a service factory instantiated in blueprint like this: >> >> >> >> > >> factory-method=3D"createService" > >> >> >> >> >> >> >> >> >> >> >> >> And inside the factory just do a Class.forName to instantiate and >> return >> >> it, >> >> will the service reference itself be proxied? >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> 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. >> >> >> >> > --001a114a85244f19e2052cc5ce2c--