The guice Module, will create the object graph, as common with Guice.
In a consumer plugin, I would do a field injection to get an instance of
private IDataService dService;
As such this works and my dService is instantiated, but I am aware Guice
wasn't intended to be used as such, but rather have a bootstrap class
which would inject all dependencies in the whole application. This
however doesn't fit in the concept of bundles which form the application
and can be started at any given time.
Personally I think there is no need for Guice in an OSGi-environment since the ds (declarative services) provide you with a powerful, easy-to-use framework for dependency injection. Of course it's also a matter of taste but with ds you declare your services with simple xml-files (Eclipse has a special editor: New->Component Definition). A service implementation is registered against an interface (or any java class) to the osgi framework and may depend on on other services which will be injected into your implementation (not unlike Spring or Guice would do). You are able to specify the cardinality of the dependancy and the dynamic behaviour (with OSGi services can come and go at any time). I love ds and recommend it wholeheartedly. The only drawback is the tooling in eclipse which is usable but certainly could be improved.