Reputation: 47
How below both deployments are different
<feature name="my-base-bundles" version="${project.version}">
<bundle start-level="86">mvn:com.my.osgi/mycomponent/0.0.1</bundle>
</feature>
and
bundle:install -s mvn:com.my.osgi/mycomponent/0.0.1
what i observed is deploying with feature shows service:list like
[com.my.osgi.mycomponent]
-----------------------------------------------------
instance.name = mycomponent.3c2c91a5-4c28-46c3-a08e-1470192ef353
service.bundleid = 76
service.factoryPid = com.my.osgi.mycomponent
service.id = 397
service.pid = com.my.osgi.mycomponent.3c2c91a5-4c28-46c3-a08e-1470192ef353
service.scope = bundle
and by deploying with bundle:install
[org.apache.felix.ipojo.Factory]
--------------------------------
component.class = com.my.osgi.mycomponent
component.description = factory name="com.my.osgi.mycomponent" bundle="77" state="valid" implementation-class="com.my.osgi.mycomponent"
requiredhandlers list="[org.apache.felix.ipojo:properties, org.apache.felix.ipojo:callback, org.apache.felix.ipojo:provides, org.apache.felix.ipojo:architect
ure]"
missinghandlers list="[]"
provides specification="com.my.osgi.mycomponent"
inherited interfaces="[com.my.osgi.mycomponent]" superclasses="[]"
component.providedServiceSpecifications = [com.my.osgi.mycomponent]
factory.name = com.my.osgi.mycomponent
factory.state = 1
service.bundleid = 77
service.id = 153
service.pid = com.my.osgi.mycomponent
service.scope = singleton
it work fine but my pax-exam tests are getting failed as after installing i look for service
serviceReferences = this.bundleContext.getServiceReferences("com.my.osgi.mycomponent", filter);
how i should deploy in pax-exam so i can access services like feature deployments?
Upvotes: 0
Views: 317
Reputation: 478
The start level is different between the two installations.
So try to install the bundle with the some start-level value
Upvotes: 0