Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 16688 invoked from network); 25 Feb 2010 16:24:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2010 16:24:21 -0000 Received: (qmail 91557 invoked by uid 500); 25 Feb 2010 16:24:21 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 91385 invoked by uid 500); 25 Feb 2010 16:24:21 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 91377 invoked by uid 99); 25 Feb 2010 16:24:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Feb 2010 16:24:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karlpauls@gmail.com designates 209.85.160.49 as permitted sender) Received: from [209.85.160.49] (HELO mail-pw0-f49.google.com) (209.85.160.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Feb 2010 16:24:11 +0000 Received: by pwj2 with SMTP id 2so4312329pwj.22 for ; Thu, 25 Feb 2010 08:23:50 -0800 (PST) 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 :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=WTubz16bIG8TJnWxbA299BYLpFyjy/sYQlMpOQer9Bg=; b=PrxKavgVN7gwNQ1ADuXo8jSe4VRATjWrnl2UREmrcoJTQaESQqdDMjEQbOsW0xQB/y KBAwEHSSvcu37HYgkRGgFBlAL0iIB5zON4VTvEpeB3zn62Ro94wJknLYtq9BsVQkFQV2 26RcLXHstlpP+0Y9nCYqMPmaBnXmccXDjXrBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HOQNmsKihRZ9PRgjByZGQhNfvMxJlOxSa5F9HbJOu5N62/eYxvSmpPQamYv0yKLIKb So1cjPrijgMOxdKj6xSteoCmTZkTV1BjvCACMuVdI9TDcLNFAqFMy69T71Hdb8/sBNWg 29FbQrc1zR86K5gEWOvpOIIVozI24gI0yaMgU= MIME-Version: 1.0 Received: by 10.143.27.8 with SMTP id e8mr679585wfj.285.1267115030139; Thu, 25 Feb 2010 08:23:50 -0800 (PST) In-Reply-To: References: <4B865F90.40108@gmail.com> <55afdc851002250726n23df74d2r7d60e3a490e626ec@mail.gmail.com> <487a994c1002250815g57423918k73e3ab75dc15483a@mail.gmail.com> Date: Thu, 25 Feb 2010 17:23:50 +0100 Message-ID: <487a994c1002250823j3fd5b4f6yc13bc288492ff28b@mail.gmail.com> Subject: Re: [all] OSGI - POOL-160 From: Karl Pauls To: dev@felix.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Feb 25, 2010 at 5:17 PM, Guillaume Nodet wrote: > What is the best practices for libraries wrt to importing their own > exported packages. Well, I still don't know what you want to discuss. We have this in the FAQ: The main time you want to export only, is if your bundle is purely a library bundle, then its packages will only be used if they are needed. Another case might be if you have tightly coupled bundles sharing implementation packages. However, if your bundle will be started and especially if the exported packages define service interfaces or are referenced from service interfaces, then you will generally want to export and import them. which seems to be good and is what seems to be not followed in the below use case - which causes a problem. If commons pool wouldn't import what it exports then everything would have been fine no? Obviously, there is now single answer to this problem but the FAQ seems correct to me. I guess I'm still missing the point. regards, Karl > On Thu, Feb 25, 2010 at 17:15, Karl Pauls wrote: >> On Thu, Feb 25, 2010 at 5:11 PM, Guillaume Nodet wrot= e: >>> Guys, can we discuss that and come back with a statement we all agree o= n ? >> >> Discuss what? >> >> regards, >> >> Karl >> >>> ---------- Forwarded message ---------- >>> From: Niall Pemberton >>> Date: Thu, Feb 25, 2010 at 16:26 >>> Subject: Re: [all] OSGI - POOL-160 >>> To: Commons Developers List >>> >>> >>> On Thu, Feb 25, 2010 at 3:17 PM, J=F6rg Schaible wrote: >>>> Hi Guillaime, >>>> >>>> Guillaume Nodet wrote at Donnerstag, 25. Februar 2010 15:49: >>>> >>>>> I just had a lively chat with Peter who kinda agreed that >>>>> substitutability issue is mostly important for APIs. >>>>> >>>>> Please have a look at the Felix FAQ entry: >>>>> =A0 http://felix.apache.org/site/apache-felix-osgi- >>>> faq.html#ApacheFelixOSGiFAQ-Shouldabundleimportitsownexportedpackages%= 253F >>>>> I haven't written it, so I can't be blame for that one. >>>>> The last paragraph says: >>>>> =A0 =A0 "The main time you want to export only, is if your bundle is >>>>> purely a library bundle, then its packages will only be used if they >>>>> are needed." >>>> >>>> what we are saying is, that none of us is an OSGi expert and before we >>>> published the first artifact with such information, we took the advice= of >>>> the Apache Felix community. If they recommend now something different,= we'd >>>> like to get some "official" blessing for the changes, simply because w= e >>>> cannot really review it. >>> >>> +1 >>> >>> Niall >>> >>> >>>>> In all cases, the current imports *are* wrong and need to be fixed, >>>>> because the way they are written will fail if there is any >>>>> incompatible change ever introduced (whatever the version). =A0And I >>>>> don't think we should guarantee that, especially across major >>>>> versions. >>>> >>>> What has been released is final. We're not able to change that anymore= . All >>>> we can do is to change the OSGi information for new releases. >>>> >>>>> Anyway, the problem is the following. >>>>> You install commons-pool 1.5 in the osgi framework. >>>>> Then you install commons-pool 1.4 later. >>>>> What you end up with is: >>>>> >>>>> karaf@root> osgi:list -l | grep commons-pool >>>>> [ 100] [Active =A0 =A0 ] [ =A0 =A0 =A0 =A0 =A0 =A0] [ =A0 =A0 =A0 ] [= =A0 60] >>>>> mvn:commons-pool/commons-pool/1.5.4 >>>>> [ 124] [Active =A0 =A0 ] [ =A0 =A0 =A0 =A0 =A0 =A0] [ =A0 =A0 =A0 ] [= =A0 60] >>>>> mvn:commons-pool/commons-pool/1.4 >>>>> karaf@root> packages:exports 100 >>>>> Commons Pool (100): org.apache.commons.pool.impl; version=3D1.5.4 >>>>> Commons Pool (100): org.apache.commons.pool; version=3D1.5.4 >>>>> karaf@root> packages:exports 124 >>>>> Apache Commons Pool Bundle (124): No active exported packages. >>>>> karaf@root> packages:imports 124 >>>>> Commons Pool (100): org.apache.commons.pool.impl; version=3D1.5.4 >>>>> Commons Pool (100): org.apache.commons.pool; version=3D1.5.4 >>>>> karaf@root> osgi:start 170 >>>>> Error executing command: Unresolved constraint in bundle >>>>> org.apache.activemq.activemq-pool [129]: package; >>>>> (&(package=3Dorg.apache.commons.pool.impl)(version>=3D1.4.0)(! >>>> (version>=3D1.5.0))) >>>> >>>> While I see an error, it does not tell me a lot ;-) >>>> >>>> - J=F6rg >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> For additional commands, e-mail: dev-help@commons.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>> For additional commands, e-mail: dev-help@commons.apache.org >>> >>> >>> >>> >>> -- >>> Cheers, >>> Guillaume Nodet >>> ------------------------ >>> Blog: http://gnodet.blogspot.com/ >>> ------------------------ >>> Open Source SOA >>> http://fusesource.com >>> >> >> >> >> -- >> Karl Pauls >> karlpauls@gmail.com >> > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com > --=20 Karl Pauls karlpauls@gmail.com