Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 38796 invoked from network); 5 May 2009 20:18:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 May 2009 20:18:39 -0000 Received: (qmail 19736 invoked by uid 500); 5 May 2009 20:18:39 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 19690 invoked by uid 500); 5 May 2009 20:18:39 -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 19680 invoked by uid 99); 5 May 2009 20:18:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 20:18:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 20:18:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AE84E234C003 for ; Tue, 5 May 2009 13:17:36 -0700 (PDT) Message-ID: <1221965401.1241554656698.JavaMail.jira@brutus> Date: Tue, 5 May 2009 13:17:36 -0700 (PDT) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Updated: (FELIX-1123) CLONE -system bundle does not correctly handle (export) package attributes In-Reply-To: <195333155.1241554416321.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-1123?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard S. Hall updated FELIX-1123: ----------------------------------- Affects Version/s: (was: felix-1.4.1) felix-1.6.0 Fix Version/s: (was: felix-1.6.0) felix-1.8.0 > CLONE -system bundle does not correctly handle (export) package attribute= s > -------------------------------------------------------------------------= - > > Key: FELIX-1123 > URL: https://issues.apache.org/jira/browse/FELIX-1123 > Project: Felix > Issue Type: Bug > Components: Framework, Specification compliance > Affects Versions: felix-1.6.0 > Environment: java version "1.6.0_07" > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) > SunOS castor 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V890 > Reporter: Alexander Berger > Assignee: Richard S. Hall > Fix For: felix-1.8.0 > > > This issue is related to the follwing mailing list thread: > http://www.mail-archive.com/users@felix.apache.org/msg03403.html > Section 3.5.5 of the OSGi core specification (4.1) states: > The Framework will automatically associate each package export definiti= on > with the following attributes: > =E2=80=A2 bundle-symbolic-name - The bundle symbolic name of the expo= rting > bundle. In the case of a Fragment bundle, this is the host bundle's= symbolic > name. > =E2=80=A2 bundle-version - The bundle version of the exporting bundle= . In the case > of a Fragment bundle, this is the host bundle's version. > =20 > And section 3.6.5 specifies how these attributes must be applied when res= olving > packages. > Using Apache Felix Version 1.4.1 I have encountered the following behavio= ur=20 > when using different approaches to import packages exported by the system= bundle > (org.apache.felix.framework respectively system.bundle) when using attrib= ute > matching: > For the following test cases the bundle manifest of the system bundle loo= ks like > this: > Bundle-Version =3D 1.4.1 > Bundle-Name =3D System Bundle > Bundle-SymbolicName =3D org.apache.felix.framework > Export-Package =3D my.package; provider=3D"xxx", ... > Test Case 1: > Import-Package: my.package;bundle-symbolic-name=3D"system.bundle" > Result: Package my.package could not be resolved! > =20 > =20 > Test Case 2: > Import-Package: my.package;bundle-symbolic-name=3D"org.apache.felix.fr= amework" > Result: Package my.package could not be resolved! > =20 > =20 > Test Case 3: > Import-Package: my.package;provider=3D"xxx" > Result: Package my.package was resolved successfully. > =20 > =20 > Test Case 4: > DynamicImport-Package: *;bundle-symbolic-name=3D"system.bundle" > Result: Package my.package could not be resolved (class not found at run= time)! > =20 > =20 > Test Case 2: > DynamicImport-Package: *;bundle-symbolic-name=3D"org.apache.felix.fram= ework" > Result: Package my.package could not be resolved (class not found at run= time)! > =20 > =20 > Test Case 3: > DynamicImport-Package: my.package;provider=3D"xxx" > Result: Package my.package was resolved successfully (at runtime). > The same behaviour is also true for packages that are added to the list o= f=20 > exported packages of the system bundle by extension bundles (fragment bun= dles=20 > with extension:=3Dframework). For such packages another problem arises as= the=20 > matching attributes as defined in the Export-Package header of the extens= ion=20 > bundle are not taken over by the system bundle. So for example if the ext= ension > bundle has the following export: > Export-Package my.package;provider=3D"xxx";version=3D"1.0.0" > Then the system bundle seems to discard the attribute "provider" but resp= ects the > version attribute: > Export-Package my.package;version=3D"1.0.0" > So it looks as if the framework should be fixed to always add the automat= ic attributes to=20 > exported packages (as defined in 3.5.5). Furthermore it should also make = sure that all > other (non automatic) attributes are respected especially for exorts that= are added by > extension bundles. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.