The Restlet-Guice integration doesn't have anything to do with
servlets -- that's one of the joys of Restlet!. ;-)

But Leigh Klotz might be working in a hybrid Restlet/Servlet
environment. Perhaps Leigh can say why the proposed deprecation would
inhibit use of FinderFactoryModule in that setting -- I don't see a
problem.

The other Guice integration work I've done, DWR-Guice, uses a custom
servlet -- a subclass of DwrServlet -- in conjunction with a user-
supplied servlet context listener. The user has the choice of
subclassing one of two abstract servlet context listener
implementations: (1) the listener is the "root" module with other
modules installed by its configure method, or (2) the listener
implements the createInjector() method to return the already-created
injector. In both cases, the injector is published via a servlet
context attribute that is independent of the one being deprecated in
the Guice API.

I like to think I've minimized the diabolism. In particular, I go out
of my way not to interfere with Guice "standard" bindings for
requests, responses, and sessions and still allow the "natural"
bindings for DWR (that have been around since before Guice existed).
This integration has to work with Guice 1.0, so the implementation is
a bit tricky in order to shield the user from the gnarliness. Guice
2.0 probably would have made things easier, but alas, it will have
come much too late.

--tim


On Mar 8, 8:23 pm, "Dhanji R. Prasanna" <[email protected]> wrote:
> On Sun, Mar 8, 2009 at 6:50 AM, Tim Peierls <[email protected]> wrote:
>
> > On Mar 5, 8:14 pm, "Dhanji R. Prasanna" <[email protected]> wrote:
> > > > - It makes it difficult for me to get the Injector for use by Tim
> > Peierls' Restlet integration
>
> > > Hmm, I'll ask Tim if I can update his restlet thing for GS2. He will be
> > > loads happier to use ctor injection I am sure!
>
> > > (Tim are you still on this list?)
>
> > Yes, I am, but I don't see what this has to do with the Restlet-Guice
> > integration, which just provides a special module,
> > FinderFactoryModule, that can be used like any module.
>
> Well, then there should be no problem at all. Are you looking up the
> injector from ServletContext(INJECTOR_NAME)? coz we're going to deprecate
> this...
>
> That's the only difference I can think of if you're not using the extremely
> evil and diabolical InjectedHttpServlet.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to