Practically you can drag the providers to the initial requirements list, they 
are then added.

However, I am curious to your scenario since I rarely, if ever, have multiple 
providers of the same service in an application. The cases where I’ve seen 
people do this is more that there is some service to which you have multiple 
contributors. You want discriminate between these cases because when you 
provide an API you get NO backward compatibility so you’re forced to 
synchronize the different providers to have the same API version which is hard. 
In the contributing case you make the interface the contributor has to 
implement a consumer type so that it gets backward compatibility. I.e. this is 
the whiteboard model.

So if you have multiple contributors then you should separate the API from the 
contributors in a separate JAR. The contributors will then show up in the 
optional list if you follow the osgi.implementation namespace rules.

Kind regards,

        Peter Kriens





> On 27 sep. 2016, at 08:13, manoj.vrajam...@wipro.com wrote:
> 
> Hi All,
>  
> I have four providers (.provider) all of them exporting the same API (.api)  
> ina certain osgi/enroute/bndtools project.  Correspondingly I have an 
> application that attempts to access this service. 
>  
> NB: I am following the http://enroute.osgi.org/qs/410-exercise-service.html 
> <http://enroute.osgi.org/qs/410-exercise-service.html> style, trying to have 
> a REST API access to the providers/services
>  
> Now, when I resolve the application bndrun file, only one provider gets added 
> to the RunBundles list. The others are not added.
>  
> I have two questions here:
>  
> 1.       How do I add all the four providers into the RunBundles list ?
> 2.       If I have an external bundle (say a normal java jar file), then how 
> do I add this bundle to interact with this application?
>  
> Thanks,
> Manoj
>  
> The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments. WARNING: Computer viruses can be transmitted via 
> email. The recipient should check this email and any attachments for the 
> presence of viruses. The company accepts no liability for any damage caused 
> by any virus transmitted by this email. www.wipro.com 
> <http://www.wipro.com/>_______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
> https://mail.osgi.org/mailman/listinfo/osgi-dev 
> <https://mail.osgi.org/mailman/listinfo/osgi-dev>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to