Guice

all tags

Pages tagged with "Guice":

OSGI, Guice, and Peaberry: first steps

27 Feb 2013 , tagged: OSGI, Guice, Peaberry, Java

Introduction I’ve been trying to get Google Guice and Peaberry to work in my OSGI projects for a while. Google Guice is a great dependency injection framework, and Peaberry promises to bridge the gap between OSGI services and dependency injection. However, getting Peaberry to work was not trivial, mostly because there aren’t many docs and the quality of the docs is somewhat lacking. The best piece is still this pdf Peaberry - blending services and extensions, but it’s a lot of information in very little space.

read more →

Google Guice and Scope Mixing

11 Dec 2012 , tagged: Guice, Dependency Injection, Java

I’ve been working on a small Java application I wrote a few years ago for some bug fixes and in the process of making it better, I introduced Google Guice, my favourite dependency injection framework. On of the great features of Guice is that it supports different scopes for injection. Per default, Guice will return a new object for every request. But sometimes you want to objects to be created a bit less liberally, for example, you want a certain object to be created only once.

read more →