users@jersey.java.net

Guice access to Jersey-created objects

From: Craig McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Thu, 13 Aug 2009 11:32:51 -0700

Furthering my explorations with integrating Jersey and Guice, I'd like
to be able to inject Jersey-provided components into a
Guice-instantiated service class. As a particular example, I have a
"transformer" class that turns my internal data model object into a
suitable external representation, including some computed URIs. For
that, I need to have Guice able to inject things like the UriInfo object
Jersey injects into resource classes.

OK, I can bind a Provider<UriInfo> into Guice's injector ... but where
does the implementation of this acquire the UriInfo instance from
Jersey? Any ideas on a strategy to make these kinds of things visible
to Guice's injector?

Craig