Question

I have an Eclipse product build using features. All of the services are registered via Declarative Services. As I understand it, the bundle must be started for the Service Component Runtime to pick up and then register the services exposed in each bundle.

I want to automatically start every bundle that's installed in my OSGi runtime. Is there a simple way to do this? The only thing I can find is the Product > Configuration > Start Levels > Auto-Start option. I don't want to have to do this in every product build that I have since I wanted to move to features to group & to start similar bundles together.

Is there a simple/recommended way to do this?

Was it helpful?

Solution

I think the stack overflow question/answer[1], comprehensively discuss your requirement. or else if you are using a p2-enabled product, you can set the start-by-default param to 'true' within your bundles.info file. But that is a hacky way.

[1] In Equinox Is it possible to to mark an OSGi bundle as started from its containing feature's p2.inf?

OTHER TIPS

Remove Bundle-ActivationPolicy: lazy from your MANIFEST.MF and make sure that the attribute enabled="false" is not in your component definition!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top