Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 8587 invoked from network); 24 Aug 2009 16:35:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Aug 2009 16:35:00 -0000 Received: (qmail 24896 invoked by uid 500); 24 Aug 2009 15:35:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24875 invoked by uid 500); 24 Aug 2009 15:35:26 -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 24865 invoked by uid 99); 24 Aug 2009 15:35:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2009 15:35:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.220.216 as permitted sender) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2009 15:35:16 +0000 Received: by fxm12 with SMTP id 12so1570515fxm.20 for ; Mon, 24 Aug 2009 08:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=4s7MJA3B1IR4XtvZJtGkWQUtwagZprTX/uMi1O6h+Kk=; b=C77PbvboR/crJy6wUIKhIHKub219ffkOiHnbQvqvSBoTnUa3YyFyLh1AJ4o50w9jD7 xp/8lCiR1FyhNRbieZTuNn+fUr+yAjQYqWFoAlynYVxDkcC9w/RHLa6zJauxF1a6u5CT nye4HSC+ACGvG2cyjXKieXiZJjO/44cg0t1fk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=im3eT7F6Y+diz6SqjoCs7ZfI/uOS0a8WVg4gQg/GuFNCVgWdJOFwNv32uA65exSzry JzeWW7YUh9qRdXmKJh+WZbWpYOq8wnzPu7OyMcpgCuX0a2bSDf1fcCjKMmnMKOeqH1YR v4iQyaLGsV1bJ2tqbo4yi5y4R1HZtLLkN7yfc= MIME-Version: 1.0 Received: by 10.204.155.79 with SMTP id r15mr1479754bkw.142.1251128093105; Mon, 24 Aug 2009 08:34:53 -0700 (PDT) In-Reply-To: <4A92A5F8.1060407@martin-krasser.de> References: <4A92A5F8.1060407@martin-krasser.de> From: Claus Ibsen Date: Mon, 24 Aug 2009 17:34:33 +0200 Message-ID: <5380c69c0908240834w404aac6eneb7202182174b0c7@mail.gmail.com> Subject: Re: Loading TypeConverters in OSGi with Camel 2.0 RC1 To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Aug 24, 2009 at 4:38 PM, Martin Krasser wrote: > Hi, > > I'm playing with Camel 2.0 in OSGi (Equinox) and found that TypeConverters > are loaded by camel-osgi only from bundles that have been STARTED. The > reason why TypeConverter loading from RESOLVED bundles doesn't work is that > the OsgiPackageScanClassResolver relies on a BundleContext which is null for > bundles in RESOLVED state (as required by the OSGi spec 4.1 section 4.3.17). > This leads to a NullPointerException. If it should be possible by design > that TypeConverters can also be loaded from bundles in RESOLVED state, > please let me know then I'll try to create a patch. > That would be fantastic, as it does cause a bit of pain as you need to have bundles started and loading in correct order for all the type converter stuff to work properly. G. Nodet from Apache Serviemix / Karaf also had some notes on this as well. There is a dicusssion on Camel Dev about it - title = Converter discover in OSGi. In the longer run I would like to rework the compoent loading to be more isolated and confined to per component base. So eg type converters are loaded as part of a component and not as now the only one discovered by classpath scanning at first need. > Btw, great work that you all did for Camel 2.0. It's a pleasure to work with > it! > Thanks. Hope your upgrade in IPF did go well. > Thanks, > Martin > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus