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 49C1818A4C for ; Fri, 5 Feb 2016 21:10:19 +0000 (UTC) Received: (qmail 14747 invoked by uid 500); 5 Feb 2016 21:10:18 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 14698 invoked by uid 500); 5 Feb 2016 21:10:18 -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 14686 invoked by uid 99); 5 Feb 2016 21:10:18 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Feb 2016 21:10: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 A0482C1499 for ; Fri, 5 Feb 2016 21:10:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 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] 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-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 7m0dvmUtFYzx for ; Fri, 5 Feb 2016 21:10:15 +0000 (UTC) Received: from mail-vk0-f70.google.com (mail-vk0-f70.google.com [209.85.213.70]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 7D15120CD0 for ; Fri, 5 Feb 2016 21:10:15 +0000 (UTC) Received: by mail-vk0-f70.google.com with SMTP id e64so153023061vkg.3 for ; Fri, 05 Feb 2016 13:10:15 -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 :content-type; bh=Ue0/oic5KjkozbZNOaROm7LZj0eXbopyXdQ7H9QkIvo=; b=Lli0Vm1Q4BesEtiBm7dMyVz2GxjsSGOv1xpoao/e43vTwQTrVP6ABA3mzmvERLtsUy 2ZkWXbCg3TYr9V1C07+SNGY1ZIA9pXv7LE5a3EzX6WMKUoh+/ein/hWDuTmSAQOrOXad FFjtA5V5DRcamwCkxW+9ZLuKVvYLXPTCqVcV4JwqvLbEy8P3b0VuyFHZ7mYUzkP+yR8l Oi/4E9k5KS0iBGVmJpc9g+Rp+viTo5v8irWiqp3+OjmxGdjJNBGHnSHMHIX5LhhWWJKV hYArnSe6wSqDV5EORBMFI58n8CB/MZ8aZuU2FlhJ5+88J3gyF/RIye09LeJZ4NRiLiIm SiXA== 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:content-type; bh=Ue0/oic5KjkozbZNOaROm7LZj0eXbopyXdQ7H9QkIvo=; b=mGZNz4nMpH17pXqqRamTuFgzMNTbl1D2J4vZ9NJbFVciFbO2sX0PXBdAUVQn5MUIQr glJWJDS/mB8+ARmPx2RhkSbZvpKfVp1ej7w+aZmosbF0Hu0VnvsZDiwZWIBYLZoqERYy Mrf5nSRbYDiTzfWZPUWMkLRXpAgG5z+6svAYPu4YdhHVm//tVgdVNFP0vmhIkPMNlz6e 5UJx8GGZk3Mzf3u6WQWtrxLNhy0me0+isxKBadgrKEACFq7wfmj4yzDQFpK71Z6gQ3Lo d1AyyWCEU7XoVt0oW8CrI3NhGdwgYuMdbdcdJ/QZ4FPga0MVrcr6paNXYSfSpyICTekr jABQ== X-Gm-Message-State: AG10YORYiJPDtKkg+nDXa72MAnwAJ+ZpoB/WxSOFUVXpn+fttdldJ+OQIIfejBkB43cMuye6HWTqGdjS98bRil4l MIME-Version: 1.0 X-Received: by 10.55.72.70 with SMTP id v67mr19134170qka.47.1454706614547; Fri, 05 Feb 2016 13:10:14 -0800 (PST) Received: by 10.55.158.2 with HTTP; Fri, 5 Feb 2016 13:10:14 -0800 (PST) In-Reply-To: <3A5E1E65-F1E6-4F6C-8524-7D5EFF31C2A3@pronoia-solutions.com> References: <56B075BF.7070402@die-schneider.net> <05311D92-7219-46F7-8A48-1759DF332642@pronoia-solutions.com> <56B113A3.8030200@die-schneider.net> <56B12A73.4030002@die-schneider.net> <02A02F2C-8679-4356-BBEE-1634701B68BF@pronoia-solutions.com> <3A5E1E65-F1E6-4F6C-8524-7D5EFF31C2A3@pronoia-solutions.com> Date: Fri, 5 Feb 2016 15:10:14 -0600 Message-ID: Subject: Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder From: Brad Johnson To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a114a97f6037083052b0c472b --001a114a97f6037083052b0c472b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Quinn, If you wouldn't mind putting a reference in there as a "may be related to" the other issue that would be great. There shouldn't be a reason in an OSGi environment for any classloaders grabbing concrete implementations from other bundles and the current Camel classloader mechanics explicitly use that reach around when they can't find what they are looking for. It may be a different bug but ultimately that loophole has to be closed. Brad On Fri, Feb 5, 2016 at 3:01 PM, Quinn Stevenson wrote: > OK - I=E2=80=99ve created an new JIRA issue describing what I=E2=80=99m s= eeing. > https://issues.apache.org/jira/browse/CAMEL-9570 < > https://issues.apache.org/jira/browse/CAMEL-9570> > > I=E2=80=99ll extract some samples from my projects and add them to the t= icket > shortly. > > > > On Feb 3, 2016, at 12:05 AM, Christian Schneider < > chris@die-schneider.net> wrote: > > > > I would use a new issue that just explains what happens without trying = to > > interpret. We do not yet know what really happens but I hope we can fin= d > > out. > > > > Christian > > > > 2016-02-03 3:40 GMT+01:00 Quinn Stevenson = : > > > >> I would expect the CamelContext to keep trying to run as well, but I > >> expected it to hit the call to the OSGi service, block, and then timeo= ut > >> and throw a ServiceUnavailableException. But what I=E2=80=99m seeing = is the > call > >> to the OSGi service is completing (it=E2=80=99s basically and echo ser= vice right > >> now), and continues to complete. My test route is driven by a timer, > and > >> it will continue to log calls to the OSGi service even when the bundle > >> providing the service has been stopped. > >> > >> I checked and made sure I didn=E2=80=99t have any other bundles provid= ing the > >> service. > >> > >> The really strange part to me is just injecting what should be the > service > >> proxy into the RouteBuilder results in a route that isn=E2=80=99t usin= g > Blueprint > >> service proxies. I=E2=80=99ve changed the route to use the bean compo= nent, > which > >> works as I=E2=80=99d expect as long as I don=E2=80=99t inject the bean= into the route > >> builder. > >> > >> I was going to put some samples in the JIRA issue that was created for > >> this - is that still the right place? Or do we need a different JIRA > issue? > >> > >>> On Feb 2, 2016, at 3:15 PM, Christian Schneider < > chris@die-schneider.net> > >> wrote: > >>> > >>> On 02.02.2016 23:08, Quinn Stevenson wrote: > >>>> Christian - > >>>> > >>>> I don=E2=80=99t know about a class loader issue, but I do know when = I run the > >> route configured as you have it below, I=E2=80=99m not getting a proxy= to the > >> service. I know this because if I stop the bundle containing the OSGi > >> service, the Camel context keeps running - I don=E2=80=99t get a > >> ServiceUnavailableException after the timeout. In fact, it keeps usin= g > >> whatever is injected into the RouteBuilder. > >>>> > >>>> I think that=E2=80=99s where the class loader thing came from - it a= ppear to > be > >> using the implementation of the service directly - not via a Blueprint > >> proxy. > >>>> > >>>> > >>> It is normal that the camel context keeps running as blueprint uses > >> service damping. So the proxy should remain the same when the service > goes > >> away or changes. > >>> I would expect the service call to block and return > >> ServiceUnavailableException after the blueprint service timeout though > in > >> case there is no service. > >>> > >>> Sounds quite strange. > >>> > >>> Can you check in karaf using the service:list command that there is > >> really no Echo service running anymore? > >>> > >>> Christian > >>> > >>> -- > >>> Christian Schneider > >>> http://www.liquid-reality.de > >>> > >>> Open Source Architect > >>> http://www.talend.com > >>> > >> > >> > > > > > > -- > > -- > > Christian Schneider > > http://www.liquid-reality.de > > < > https://owa.talend.com/owa/redir.aspx?C=3D3aa4083e0c744ae1ba52bd062c5a7e4= 6&URL=3Dhttp%3a%2f%2fwww.liquid-reality.de > > > > > > Open Source Architect > > http://www.talend.com > > < > https://owa.talend.com/owa/redir.aspx?C=3D3aa4083e0c744ae1ba52bd062c5a7e4= 6&URL=3Dhttp%3a%2f%2fwww.talend.com > > > > --001a114a97f6037083052b0c472b--