According to
http://architects.dzone.com/articles/putting-java-rest
javax.ws.rs.core.Application.getSingletons() should be used if you want to
use custom injection (such as Spring or Guice) but this makes little sense
to me because it restricts you to singleton injection (that is, once you
return an instance it lives forever).
Wouldn't it make more sense to have Set<MyProvider> getProviders() where
MyProvider is a class factory similar to Guice "Provider"? This would let
you use Guice to inject your instances and potentially use the HTTP-request
scope.
Gili
--
View this message in context: http://n2.nabble.com/Using-Guice-with-JAX-RS-tp1127230p1127230.html
Sent from the Jersey mailing list archive at Nabble.com.