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 9D2AF2902 for ; Tue, 3 May 2011 21:23:02 +0000 (UTC) Received: (qmail 30644 invoked by uid 500); 3 May 2011 21:23:02 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 30612 invoked by uid 500); 3 May 2011 21:23:02 -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 30604 invoked by uid 99); 3 May 2011 21:23:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 21:23:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of johannes.klug@logica.com designates 213.199.154.206 as permitted sender) Received: from [213.199.154.206] (HELO AM1EHSOBE003.bigfish.com) (213.199.154.206) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 21:22:56 +0000 Received: from mail5-am1-R.bigfish.com (10.3.201.240) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.22; Tue, 3 May 2011 21:22:33 +0000 Received: from mail5-am1 (localhost.localdomain [127.0.0.1]) by mail5-am1-R.bigfish.com (Postfix) with ESMTP id 504DD18180E6 for ; Tue, 3 May 2011 21:22:33 +0000 (UTC) X-SpamScore: -30 X-BigFish: VPS-30(zzbb2dK1861R1803M9371O542Mzz1202hzz8275bh8275dhz2fh668h839h34h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:81.145.48.108;KIP:(null);UIP:(null);IPVD:NLI;H:c1-ex001.groupinfra.com;RD:none;EFVD:NLI Received-SPF: pass (mail5-am1: domain of logica.com designates 81.145.48.108 as permitted sender) client-ip=81.145.48.108; envelope-from=johannes.klug@logica.com; helo=c1-ex001.groupinfra.com ;oupinfra.com ; Received: from mail5-am1 (localhost.localdomain [127.0.0.1]) by mail5-am1 (MessageSwitch) id 1304457752861221_9438; Tue, 3 May 2011 21:22:32 +0000 (UTC) Received: from AM1EHSMHS004.bigfish.com (unknown [10.3.201.248]) by mail5-am1.bigfish.com (Postfix) with ESMTP id C3E3EC78050 for ; Tue, 3 May 2011 21:22:32 +0000 (UTC) Received: from c1-ex001.groupinfra.com (81.145.48.108) by AM1EHSMHS004.bigfish.com (10.3.207.104) with Microsoft SMTP Server id 14.1.225.22; Tue, 3 May 2011 21:22:32 +0000 Received: from de-ex016.groupinfra.com ([10.48.94.16]) by c1-ex001.groupinfra.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 3 May 2011 22:22:32 +0100 Received: from de-ex013.groupinfra.com ([10.48.94.13]) by de-ex016.groupinfra.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 3 May 2011 23:22:32 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CC09D8.36A62BB4" Subject: RE: Problem designing a camel route for an OSGi system. Date: Tue, 3 May 2011 23:18:10 +0200 Message-ID: <91783E5730D6DD4AB5B1B518437F54911A6196@de-ex013.groupinfra.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: <91783E5730D6DD4AB5B1B518437F54911A6196@de-ex013.groupinfra.com> Thread-Topic: Problem designing a camel route for an OSGi system. thread-index: AcwIOtL3vDz7Ob4JR0iLB8nuUyxVfQBnMfja References: From: "Klug, Johannes" To: X-OriginalArrivalTime: 03 May 2011 21:22:32.0251 (UTC) FILETIME=[36B7E8B0:01CC09D8] X-OriginatorOrg: logica.com ------_=_NextPart_001_01CC09D8.36A62BB4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm having some troubles with this as well. Could someone enlighten us what= the best way would be to get multiple routes into a single OSGi applicatio= n? -----Original Message----- From: Mark Doyle [mailto:markjohndoyle@googlemail.com] Sent: Sun 5/1/2011 10:02 PM To: users@camel.apache.org Subject: Problem designing a camel route for an OSGi system. = I have the spring file below. It simply creates a couple of beans which are used in a camel route. The camel route is obviously configured in the context section. One of the beans is actually an OSGi service (id camelParameterProvider) which means it's used by multiple service consumer bundles (In this case there are many eclipse views using it to get data). Unfortunately this means all service consumers share the same bean which has the same route! (I assume the same camel context?) This would be fine but I want to filter the incoming data using the parameterFilterer bean. The filtering part works fine except that all the views are sharing the same service provider bean so when one filters the route all the other consumers only receive the filtered messages too. One way I explored to solve this was to use the bundle scope for the bean. Unfortunately the camel route references only a bean uri (the "to" part of the route) so no messages are routed. I guess camel has no way to know which instance of the bean to route to (and why would it). Is this a symptom of a bad design or is there a way around this. Perhaps creating a bean that provides the OGSi service AND is a routebuilder then trying to use that with bundle or prototype scope... P.S. I'm not sure if this is a Camel, Spring, or OSGi issue! :) I created a diagram here that may explain the overall view better: http://dl.dropbox.com/u/10007025/hbird/pictures/hummingbird%20gui%20paramet= er%20retrieval.png Spring file: snip! Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipi= ent(s) only. It may contain proprietary material, confidential information = and/or be subject to legal privilege. It should not be copied, disclosed to= , retained or used by, any other party. If you are not an intended recipien= t then please promptly delete this e-mail and any attachment and all copies= and inform the sender. Thank you. ------_=_NextPart_001_01CC09D8.36A62BB4--