You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sahoo <Sa...@Sun.COM> on 2008/08/09 17:48:48 UTC

Optional import followed by DynamicImport-Package

Here is what I think is an interesting scenario:

Bundle A
------------
Bundle-SymbolicName: A
Import-Package: p; resolution:=optional; company=FOO
DynamicImport-Package: *

Bundle B
------------
Bundle-SymbolicName: B
Export-Package: p


Both A & B are installed. When A gets resolved, a wire could not be 
established for package p, because attribute did not match. Now at 
runtime, when A loads a resource from package p, because of presence of 
DynamicImport-Package=*, p gets wired to bundle B! This sounds counter 
intuitive to me. What do you think?

Thanks,
Sahoo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Optional import followed by DynamicImport-Package

Posted by Sahoo <Sa...@Sun.COM>.
Richard S. Hall wrote:
> Sahoo wrote:
>> Here is what I think is an interesting scenario:
>>
>> Bundle A
>> ------------
>> Bundle-SymbolicName: A
>> Import-Package: p; resolution:=optional; company=FOO
>> DynamicImport-Package: *
>>
>> Bundle B
>> ------------
>> Bundle-SymbolicName: B
>> Export-Package: p
>>
>>
>> Both A & B are installed. When A gets resolved, a wire could not be 
>> established for package p, because attribute did not match. Now at 
>> runtime, when A loads a resource from package p, because of presence 
>> of DynamicImport-Package=*, p gets wired to bundle B! This sounds 
>> counter intuitive to me. What do you think?
>
> No, this is not counter intuitive because your dynamic import is more 
> broad than your static import. If you put a matching attribute on your 
> dynamic import, then it won't match p either.
OK, thanks for the explanation.
> If anything, this is a poorly specified bundle.
That was a test bundle I created to see if I could work around bug #676 
in any way.

Thanks,
Sahoo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Optional import followed by DynamicImport-Package

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Sahoo wrote:
> Here is what I think is an interesting scenario:
>
> Bundle A
> ------------
> Bundle-SymbolicName: A
> Import-Package: p; resolution:=optional; company=FOO
> DynamicImport-Package: *
>
> Bundle B
> ------------
> Bundle-SymbolicName: B
> Export-Package: p
>
>
> Both A & B are installed. When A gets resolved, a wire could not be 
> established for package p, because attribute did not match. Now at 
> runtime, when A loads a resource from package p, because of presence 
> of DynamicImport-Package=*, p gets wired to bundle B! This sounds 
> counter intuitive to me. What do you think?

No, this is not counter intuitive because your dynamic import is more 
broad than your static import. If you put a matching attribute on your 
dynamic import, then it won't match p either. If anything, this is a 
poorly specified bundle.

-> richard

>
> Thanks,
> Sahoo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org