After half an hour, I was able to get a simple bundle running with Apache Felix. I wrote a simple program embedding Apache Felix and created another project which provided a bundle.
My main interest in OSGI is dependencies management handling :
- Service A is started
- Service B depends on Service A
- if service A is not available -> do not start service B
- if service A is available -> start the service B and register it
2 comments:
Hi,
It can be even simpler by using service component model as SCR (http://felix.apache.org/site/apache-felix-service-component-runtime.html) or iPOJO (http://felix.apache.org/site/apache-felix-ipojo.html).
You don't need to manage the dynamism of services. Service registration and tracking are managed by these frameworks, and then injected inside method (SCR/iPOJO) or fields directly (iPOJO).
Thanks Clement, I'll have a look at ipojo
Post a Comment