Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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