2

I read the Wikipedia articles on both, and both are not mentioned together. Also, the purpose of OSGi is not Dependency Injection. Yet, what an OSGi container like Felix does matches the description for DI.

1 Answer 1

2

OSGi is conceptually related to Dependency Injection, both are about separation of concerns. A form of Dependency Injection can be achieved in OSGi via its Declarative Services specification, as explained in:

You can also achieve DI in OSGi via peaberry, an extension library for Google-Guice that supports dependency injection of dynamic services and provides OSGi integration out of the box.

* Worth noting that the article is part of a series listed in OSGi Alliance's basic education on OSGi technology page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.