[ 
https://issues.apache.org/jira/browse/FELIX-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984188#action_12984188
 ] 

Guillaume Nodet commented on FELIX-2546:
----------------------------------------

The maven bundle plugin does indeed generate those by parsing the blueprint 
files in the bundle.
However I for example as already use the <reference-list> in blueprint in place 
of a <reference> for the sake of being able to have better control over the 
chosen service.   I think the problem is the same than for optional 
dependencies.   
I'm not sure how you control your OBR repositories or which tool you use, but 
depending on the repositories used, bringing dependencies in a greedy way could 
lead to *a lot* of (actually unneeded) dependencies being resolved (and 
eventually provisioned).
I do have some code that uses:
    
resolver.resolve(org.apache.felix.bundlerepository.Resolver.NO_OPTIONAL_RESOURCES)
in order to bring back a "minimal" set of dependencies.

One way would be to tie the value of that flag to the NO_OPTIONAL_RESOURCES 
flag, as those are somewhat similar in meaning.   Unless an explicit flag is 
used to either enable or disable multiple solutions.

I reallly think backward compatibility is important for now, but I'd be happy 
to revisit in the next major version (which will hopefully implement the not 
yet published OSGi spec).

> Only one service is provisioned even when specifying for mulitple services
> --------------------------------------------------------------------------
>
>                 Key: FELIX-2546
>                 URL: https://issues.apache.org/jira/browse/FELIX-2546
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.4
>         Environment: n/a
>            Reporter: Emily Jiang
>         Attachments: Felix OBR isMultiple support - timothyjward.txt
>
>
> Felix OBR is unable to return multiple services when specifying 'multiple' 
> attribute with the value of 'true'. The test scenario is detailed below.
> I am trying to get all bundles registering the service of 
> com.sample.HelloWorld and install them into the osgi framework . In my test 
> environment, there are two bundles with different symbolic name offering the 
> same service, com.sample.HelloWorld. However, only one bundle was pulled into 
> runtime. The snippet of my repository is shown below. 
> <require extend="false" 
> filter="(&amp;(service=service)(objectClass=com.sample.HelloWorld)(mandatory:&lt;*service))"
>  multiple="true" name="service" optional="false">Requires service with 
> attributes {service=service, objectClass=com.sample.HelloWorld}</require>
> Regards
> Emily

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to