Hello,

I am a new iPOJO/Felix user and I am using it to implement a simple case study. Let's suppose that there are 10 providers (called provider #1, provider #2, ..., provider #10) that offer the same service, each one is a bundle composed by one component. The consumer (another bundle composed by a single component) can *only* "trust" in two of them, provider #1 and provider #2. So it only accepts them as providers.

I read in [1] that I can target a specific provider by using the *from* attribute as follows:


<component classname="...HelloConsumer">
<requires from="MyHelloProvider">
     <callback type="bind" method="bindHello">
     <callback type="unbind" method="unbindHello">
</requires>
...
</component>


However, I need to target *either* the provider #1 *or* the provider #2. I did it by filtering the provider writing a method in the POJO code, but I would like to let the handler addresses it for me. So here are my questions:

1) How could I do it by just modifying/tuning my metadata.xml file (i.e., by letting the handler addresses it for me)?

2) If it is possible, could I also specify something like to target *both* the provider #1 *and* the provider #2?


Thank you in advance,

--
André Lage Freitas

[1] http://felix.apache.org/site/service-requirement-handler.html#ServiceRequirementHandler-Targetingaspecificprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to