geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick McGuire <rick...@gmail.com>
Subject Re: Understanding the "partial=true; mandatory:=partial" trick
Date Wed, 09 Dec 2009 18:26:37 GMT
Lin Sun wrote:
> Hi,
>
> Do we have to use Require-Bundle here?  I would think Import-Package
> of packageX with the mandatory attribute should wire bundle 2 to
> bundle 1.
>
> Here's my understanding of your scenario:
>
> Bundle1:
> Export-Package:x;partial=true;mandatory:=partial
>
> Bundle2:
> Import-Package:x;partial=true
> Export-Package:x
>
>
> Any other bundles - should be wired to bundle 2:
> Import-Package:x
>   
Everything I've seen about using partial=true in the core specification 
also indicates that Require-Bundle is necessary to get everything wired 
up together.  I don't see anything in the core specification that 
indicates partial=true has any meaning on an Import-Package.  Section 
3.12.1 specifically states:

"...only bundles using the Require-Bundle header can have split packages."

Which pretty much states that Require-Bundle needs to be used.

Rick


> Lin
>
> On Tue, Dec 8, 2009 at 11:27 PM, Jarek Gawor <jgawor@gmail.com> wrote:
>
>   
>> The best solution is of course the remove the split package problem in
>> the first place. But if that's not possible, another solution is to
>> combine the mandatory attribute trick with Require-Bundle. That is,
>> bundle 1 exports package X with some mandatory attribute and bundle 2
>> has Require-Bundle on bundle 1 (and also exports package X). So all
>> imports on package X would always be wired to bundle 2 and bundle 2
>> would have access to all classes in package X. Do I have that right?
>>     
>
>   


Mime
View raw message