Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 74503 invoked from network); 13 Mar 2009 16:28:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2009 16:28:09 -0000 Received: (qmail 31682 invoked by uid 500); 13 Mar 2009 16:28:06 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 31636 invoked by uid 500); 13 Mar 2009 16:28:06 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 31627 invoked by uid 99); 13 Mar 2009 16:28:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 09:28:06 -0700 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: local policy) Received: from [98.136.44.56] (HELO smtp101.prem.mail.sp1.yahoo.com) (98.136.44.56) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 13 Mar 2009 16:27:57 +0000 Received: (qmail 71777 invoked from network); 13 Mar 2009 16:27:35 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=YB0VsTXhaTt8sIFfGqk3Krtl5Mq/dHUDoLOccMUyRvmNjGdLVo/TQ0Pu60wll9ERH54zNe9vkrwzI9Z/zFjP8McLU1hCJIMa/i2+N9jSQhsyX3kMbxuClr4pvATxnAcYeVV7G20A2d0CJ5EgLYwfVMRC2+OhyebvdD9NDvfo6TE= ; Received: from unknown (HELO ?10.11.55.44?) (david_jencks@76.76.148.215 with plain) by smtp101.prem.mail.sp1.yahoo.com with SMTP; 13 Mar 2009 16:27:34 -0000 X-YMail-OSG: aT__l4QVM1lY4yvnwE_FgBCXD7o4HjTFPmVP.ExDZY1gRpTYmgKyuUZh3oJ14wQFoKsL7uhNGlbLpfWugZ2RHn_Gwvk04xSnCN2HBolF.t_.Oc86I6XPBGJVPNtCwwLxEkkFgXu1DIvRG9_BcHyw3DA46tHf4Vxb28KKJMB_ElHKeS8AbP4RIzdSOtcLmxkq0w6CI9B08UGxwUj4z8z08TGGUvuy_BG1NZSganVCKgSFPfSzZ38oRsXql5MDnZlpeUz.SqJyVz9MPYu2TIJ_VVsQpfRuDPAQl5SIzqdlP1IeAY4814n_ X-Yahoo-Newman-Property: ymail-3 Message-Id: <7B41B331-08B7-4944-8550-32775ACC848E@yahoo.com> From: David Jencks To: dev@geronimo.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Whence the geronimo kernel? Date: Fri, 13 Mar 2009 09:27:33 -0700 References: <76B612C4-8F1C-4432-A57F-23727674307D@yahoo.com> <5eb405c70903111127x49cd2c71xc068471b2f6d4338@mail.gmail.com> <6F9CE147-0968-4921-943D-F127DBF91387@yahoo.com> <5eb405c70903112251k4702b870q761783261d7a5a4@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org I read the blog entry and discussion. The entire discussion is predicated on the idea that osgi is close to ideal as-is and we have no need to consider any other point of view. If you step back a bit I see two things clearly acknowledged by everyone: 1. its useful to be able to know what classes are needed to make a jar/ bundle/plugin/module work and which classes are expected to be used elsewhere 2. its essential to know what jars/bundles/plugins/modules are actually in your running system In osgi-land, import-package and export-package supply (1), and require-bundle sort of helps with (2) but AFAICT right now doesn't support "artifact aliasing" In maven-land, the pom dependency tracking provides a pretty good solution for (2), including some support for overriding "requirements" through exclusions, but it's single-classloader model doesn't translate directly into an app server or osgi runtime In geronimo trunk we emphasize (2) and can actually assemble working servers using it, and have support for (1) (although its mostly backwards from osgi specifications) I'd say that in my (limited) experience osgi zealots typically think that (1) is essential and brush (2) under the carpet by working in constrained environments such as their eclipse workspace. I'd say that our experience with geronimo is that (1) is rarely needed if you have a working (2) (look at how many hidden-classes and non-overriable classes filters are in our poms -- none for the use of geronimo, and a few to make deploying applications that include the same jars as us work) The geronimo/maven approach to (2) is to include the dependency information with the artifact. I'm not sure what approach(es) osgi is considering -- OBR appears to not consider bundling dependency info with the artifact but to have a completely external specification. I don't know about p2.... but since jason vanZyl seems to be looking at it I'd guess it is more maven friendly. If you don't bundle (2) with the artifacts then you need some kind of import-package to artifact map or resolution system. We sort of have some vestiges of this today: when you deploy a web app as a geronimo plugin (or export it from a server where it was deployed) it has picked up dependencies on jetty or tomcat based on which deployer you specified in the plugin project pom or which kind of server you deployed on. Another example is that the car-maven-plugin filters the view of the local maven repo so only the versions specified in the pom are visible to the geronimo server we run off the repo -- this allows you to build plugins for a 2.1.3 server even if you have 2.2-SNAPSHOT artifacts locally and some of the dependencies don't specify the version required. I don't know where the best balance for geronimo lies here. I certainly think claiming all we need is import-package is shortchanging most of our experience in producing geronimo as a working server. thanks david jencks On Mar 13, 2009, at 7:10 AM, Lin Sun wrote: > I think I was not too clear below. I didn't mean to say that I am in > favor of Require-Bundle because it is a lot harder to come up with the > right Import-Package lists. What I meant was that the reason why a > lot of people are using Require-Bundle like David mentioned in his > early notes is probably because it is a lot easier to use. > > I personally had to spend quite some time to figure out the prob I > mentioned earlier - I was developing a bundle that needs to import > the javax.transaction package from the transaction in OSGi bundle, but > two bundles have it (the basic OSGi J2SE and the transaction in OSGi > bundle). I was able to resolve this using Import-Package with the > specific version of javax.transaction package that I need. I just > tried to switch to use Require-Bundle, that is to have my bundle to > depend on the transaction in OSGi bundle as it contains the right > version of the javax.transaction package I need, but my bundle is > broken completely due to CDNFE. I don't think the Require-Bundle > offers the fine grain control that I needed for my bundle and I am > sure Geronimo would have a lot more complicated bundles than what I > was developing. > > BTW, there's a good discussion here: > http://thhal.blogspot.com/2008/02/dependencies-and-package- > imports.html > > - in particular in the first comment from Neil Bartlett and the > limitations of Require-Bundle documented in the OSGi v 4.1 core spec > (section 3.13.3). > > Lin > > > On Thu, Mar 12, 2009 at 11:40 PM, Lin Sun > wrote: > >> Not sure about Require-Bundle. I personally has never used it and I >> never see it is being used in the OSGi repo. Require-Bundle may not >> offer the level of control that the Import-Package provides but it is >> probably a lot harder to come up with the right Import-Package lists. >> I think this scenario should work just fine if using Import-Package. >>