Because, if bundle service reference is a requirement for the resolver,
so, the resolver can install & start the feature/bundle providing the
service (capability).
When you directly install the bundle, it's up to you to first install
the bundle providing the service.
By the way, if you do getServiceReferences("my-stuff") in the bundle
providing itself the my-stuff service, it's a bad design and it should
directly use the instance (service providers and service "clients"
should be in separated bundles).
Regards
JB
On 2018-07-15 21:44, imranrazakhan wrote:
1- if both bundles are same then why service references are different
for
both?
2- why following code line is successful for one deployment(feature
based
deployment) and failing for other, i want that below code line should
successful if i do deployment with bundle:install
serviceReferences =
this.bundleContext.getServiceReferences("com.my.osgi.mycomponent",
null)
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html