Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 72711 invoked from network); 6 May 2008 13:05:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 May 2008 13:05:07 -0000 Received: (qmail 92909 invoked by uid 500); 6 May 2008 13:05:09 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 92872 invoked by uid 500); 6 May 2008 13:05:09 -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 92861 invoked by uid 99); 6 May 2008 13:05:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 06:05:08 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of glyn.normington@gmail.com designates 216.239.58.191 as permitted sender) Received: from [216.239.58.191] (HELO gv-out-0910.google.com) (216.239.58.191) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 13:04:21 +0000 Received: by gv-out-0910.google.com with SMTP id n8so163183gve.39 for ; Tue, 06 May 2008 06:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:to:message-id:content-type:from:subject:date:x-mailer:sender; bh=5ni8jA1tAPnLl2LU4jEZhG+WC9k0QPw9osAuMbcLiWg=; b=YxuAmeJpnS4ZhUAS8EWHoyrJp1rwokyFi3/RrsZfWwJTE36eluzHEP2IpTxmVUWTOYbVTvKZwju8Du+Os7/4asaPFkVGaMUYXiXJFwZmnkZUaHVw9HsAN7Q9S039BgLxWrrZ03naf65+kMDjiOop4ztsy/u22zj+9Js3kvW7kvM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:to:message-id:content-type:from:subject:date:x-mailer:sender; b=DcKvm0nLWjkNk3HSImY8Nh9DjPYTQDzDQihEG0s5cW9lEAp5GTEWaDa6dNzJ7aV73C1OkjdmmpDQLQK6tgVArHd/PsnULPWVJYdgeVzgAxf+KJYyqL4UprGK+Ekl7aGp2x804sPoQ6VkTd6i/HRFWYGY+yMbNMhmpYbsUAtewCQ= Received: by 10.78.77.9 with SMTP id z9mr183651hua.90.1210079073588; Tue, 06 May 2008 06:04:33 -0700 (PDT) Received: from ?192.168.1.156? ( [89.21.226.162]) by mx.google.com with ESMTPS id 40sm359765hue.6.2008.05.06.06.04.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 May 2008 06:04:32 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v753) To: dev@felix.apache.org Message-Id: Content-Type: multipart/alternative; boundary=Apple-Mail-1--156365700 From: Glyn Normington Subject: Re: SpringSource Bundle Repository Date: Tue, 6 May 2008 14:04:28 +0100 X-Mailer: Apple Mail (2.753) Sender: Glyn Normington X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1--156365700 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Since I just re-joined this list, please excuse a single email with multiple sub-threads. >On another point, I downloaded Commons IO 1.4 ( >http://tinyurl.com/5n8p4f ) which we released as an OSGi bundle and >they seem to have (bizarely IMO) re-packaged the original jar - but >without re-importing the exported packages, which the original jar's >manifest had, and was a recommended here. Perhaps its worth someone >making the case to them for that. I just responded to the corresponding issue (http:// issuetracker.springsource.com/browse/BRITS-5) as follows: >OSGi inherited a packaging style from its earlier releases where each bundle imports all the packages that the bundle exports so that these packages could >be substituted by another bundle. The laudable intention is that a bundle should continue to function properly when some or all of its exported packages are >provided by one or more other bundles. > >However, in practice, this places stringent compatibility requirements on exported packages which are difficult to satisfy, especially in the case of >implementation packages, and which place an unrealistic testing burden on the bundle developer. > >Substitutability is even harder to get right when constructing bundles from JAR files which were not designed primarily for, or tested in, an OSGi environment. >So we have preferred, in general, not to import each package exported from a bundle. Rather than constructing bundles of loosely coupled content which can >be substituted by other bundles, it is more robust for each bundle to provide a relatively tightly coupled collection of packages which cooperate with other >bundles via services. There are a number of trade-off's like this in the SpringSource Application Platform and the BRITS repository to make them easy to use by Spring developers. The design point was that expert OSGi users could use standard OSGi R4.1 features supported by the Platform in the normal way, but that we needed to make things easier for enterprise developers with no OSGi experience. >I think there could be another issue, which I wasn't aware of initially, >in that they introduce some new manifest headers for specifying >dependencies. If they do this for their repository bundles, then it >might not be so useful for us...I am not sure what it means for us, so >it will have to be investigated too. To reiterate Adrian's earlier statement, none of the bundles in BRITS use the SpringSource Application Platform specific manifest headers. We aim that BRITS will be more generally useful than for just the Platform. >Except for the third-party dependencies, it sounds an awful lot like >the deployment packages introduced in the R4.1 spec. I would have to >take a more detailed look to see how the two compare exactly, the >benefits you quoted are still a bit "inprecise". For example, how do >PAR files form an explicit scope around all the bundles in the >application? Is the application hidden, is there some security >mechanism in place, or what? The Platform rewrites the manifests of the bundles of an application (i.e. a PAR file) to use mandatory matching attributes to form a scope. For example the following bundle of an application called "MyApp" version 1.0: Manifest-Version: 1.0 Bundle-Name: MyBundle Bundle-ManifestVersion: 2 Bundle-SymbolicName: MyBundle Export-Package: my.package.p Bundle-Version: 1 is scoped to: Manifest-Version: 1.0 Bundle-Name: MyBundle Platform-Scope: MyApp-1 Bundle-ManifestVersion: 2 Bundle-SymbolicName: MyApp-1-MyBundle Export-Package: my.package.p;platform_scope="MyApp-1";mandatory:="platform_scope" Bundle-Version: 1 >From what I understood is just the way to express the dependency on >their new introduced "libraries" so a kind of require-bundle on a >larger scale. Even require bundle looks to me as too coarse grain >dependency and has it's issues so an import library, which is a set of >bundles only looks like trouble. Especially when there is poor >documented behavior for now and related to conflicting packages in >case you are importing different libraries with same exported >packages. But I can imagine that is an attractive option for users as >is less to write and care. But this can add frustration later on when >you wanna deploy your bundle in regular osgi framework. import-library is converted into package imports during manifest rewriting, so you get the clean semantics of import-package with none of the semantic rough edges of require-bundle. Glyn --Apple-Mail-1--156365700--