@Override
protected Injector getInjector()
{
return Guice.createInjector(new JerseyServletModule()
{
@Override
protected void configureServlets()
{
install(new AbcModule());
//params, filters and other modules
serve("/*").with(GuiceContainer.class, params);
}
});
}
AbcModule.configure:
@Override
protected void configure()
{
install(new RequestScopeModule());
}
Client code uses @Context UriInfo uriInfo; which is always null in case I do not install RequestScopeModule (since its already bound but not available in the Context). And installing it gives conflicts on all of the classes for which the providers are being created when inserting into the Context of the request.