Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 12257 invoked from network); 3 May 2009 10:40:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 May 2009 10:40:11 -0000 Received: (qmail 65301 invoked by uid 500); 3 May 2009 10:40:10 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 65231 invoked by uid 500); 3 May 2009 10:40:10 -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 65221 invoked by uid 99); 3 May 2009 10:40:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 10:40:10 +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 filippo.diotalevi@gmail.com designates 209.85.218.176 as permitted sender) Received: from [209.85.218.176] (HELO mail-bw0-f176.google.com) (209.85.218.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2009 10:40:04 +0000 Received: by bwz24 with SMTP id 24so3099106bwz.22 for ; Sun, 03 May 2009 03:39:43 -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 :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4AUYG0Lc1oRz2ec72GPRJIdgyyKeka+F+5OJzO07yz0=; b=vH4iXoEJKJj3leZhZtEFP9k3fR0RQmowISemoUPSWXIBbmDiyue9i8KoAGi/IGoPkJ yqP7BFEuSXhjlhpBxDAaQ5QgAMi6yJexy0qj6miJQYH/H6B24HkxNd+Mrc1rWbk2bQaj 9FBe957rwaKcTVvvDpmS9s+mXJg9soPD1sofU= 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=du6+qekmRvi2W1xAYawYEAbXTL/ThDaq+KMhoJWZg0HcJ9aGrdVGlNpM9ZCI+jy66+ qozNlNxA3QYKH8Oq7SN75q3sAve4qNONDNI4CCGSHmAnXBm+IAiTqpZ0c8ScIrxQoxtc vHqzH8/nXyqDtW0lDE4OoRW047H7SgVXG4Lyk= MIME-Version: 1.0 Received: by 10.103.11.7 with SMTP id o7mr2777520mui.95.1241347183583; Sun, 03 May 2009 03:39:43 -0700 (PDT) In-Reply-To: <49FCF3E4.6020803@ungoverned.org> References: <49FCF3E4.6020803@ungoverned.org> Date: Sun, 3 May 2009 12:39:43 +0200 Message-ID: Subject: Re: Fragment support From: Filippo Diotalevi To: dev@felix.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Sun, May 3, 2009 at 3:31 AM, Richard S. Hall wrote: > [..] > Please try out some fragments and give feedback. > > I will likely need to push a release of this soon, since GF has some > requirements I need to address with it. So any feedback is welcome. Hi Richard, I did a fair amount of testing on bundle fragment support yesterday and today, using both some home-made fragments and examples available. As Clement says, felix works fine with slf4j, but fails to resolve some "real world" fragments. Taking the usual hibernate bundle as an example, the 2 fragments are not resolved [ 7] [Active ] [ 1] JBoss Hibernate Object-Relational Mapper (3.2.6.ga) [ 9] [Installed ] [ 1] JBoss Hibernate Annotations (3.3.1.ga) [ 10] [Active ] [ 1] JBoss Hibernate Common Annotations (3.3.0.ga) [ 11] [Installed ] [ 1] JBoss Hibernate Entity Manager (3.3.2.GA) The reason is DEBUG: Excluding fragment com.springsource.org.hibernate.annotations from com.springsource.org.hibernate due to conflict with imported package org.apache.commons.logging from com.springsource.org.hibernate DEBUG: Excluding fragment com.springsource.org.hibernate.ejb from com.springsource.org.hibernate due to conflict with imported package javax.naming from com.springsource.org.hibernate In practice, when host and fragment share some imports (in the specific org.apache.commons.logging and javax.naming), fragments are not resolved. Specification wise, I think these double imports should be specified, since "Fragments are therefore treated as part of the host, including any permitted headers; they must not have their own class loader. " and " Append the import definitions for the Fragment bundle that do not con- flict with an import definition of the host to the import definitions of the host bundle. A Fragment can provide an import statement for a private package of the host. The private package in the host is hidden in that case. [..] A host and a fragment conflict when they cannot resolve to provide a consis- tent class space" but, as far as I see, it's quite common to find similar cases in already available bundles. -- Filippo Diotalevi