-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At the moment I am struggling with the Guice integration.
It is working based on that blog entry:
http://zcox.wordpress.com/2009/09/22/jersey-guice-scala/
When I mark an constructor of a resources with @com.google.inject.Inject
it is injected using Guice.
But I also want to add some context stuff (UriInfo) etc.
Therefore I tried to add some bindings to Guice. But I don't know how I
can get the current UriInfo. I have found that code:
http://pastie.org/521175
But I think that is wrong, since there an additional instance of
WebApplicationImpl is created (or am I missing something?).
So is there any possibility to get the reference to the WebApplication?
Any magic/static method?
I could extend com.sun.jersey.guice.spi.container.servlet.GuiceContainer
and use the instance passed to #initiate. But that looks a little bit
dirty because it is too late. Guice has still been created (see the
injected Injector to the constructor).
Any hints?
Thanks,
Johannes
- --
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBAgAGBQJMBpdbAAoJEAytD9R7Qv6dtwQH/0pLUlHriaGAuW6tZet1TU0X
u63rIImG62JP9EKqY/1mhVhu/h0sFSvsqNS13jq8biYz+6MlA5LPCrGrYSOhSqJ6
PcgpRMY0u0YEp4kLxuOIhSVWG+5hIjN5nTOSjUGP89RohzF0wWmWULDc65S4n9RG
DGi/Ph1Bhu8IDnlleHHf3L4Uk+RIBT9+RCnObQ98f8qPGjjQdqaDkpDLoqDUjFk7
DiToxC3RhUQYQnpRZMrleNJFPVvAOGfAJSkOHouU1nKiFfLyvRnEoysjYNGGQCVo
GZ6oiY00IVZ8JjY++mkhYJnHTTdaGa2/rqTFhzzAhAngb1GnBj9q/O8/O4I+ZT8=
=zRfa
-----END PGP SIGNATURE-----