The biggest wart in the DWR - Guice 1 integration is all the API and code needed to make it play well with Guice Servlet 1.0.
I rolled my own ServletContextListener because Guice Servlet's listener (at the time) didn't expose the name under which the injector was published in the servlet context, at least not in a way I felt I could count on. I believe the latest Guice Servlet version does things more flexibly, so the DWR - Guice 2 integration could probably be installed as an extension of GuiceServletContextListener or ServletModule. I made a separate set of Scopes to correspond to the DWR creator scoping options, which at the time were richer than what Guice Servlet provided. Now I think the gap has been closed, so there's probably no need for the redundant Scopes now. I found "clever" ways to request injection for things like interceptors; these techniques still work, but they are unnecessary now that we have AbstractModule.requestInjection(). The DWR internals have changed so that it might be possible to avoid some of the horrible hacks I used to get it to work originally. --tim On Oct 28, 11:08 am, Patrick Lightbody <[email protected]> wrote: > Tim, > Mind outlining the things you'd do different this time? I might take a > stab at some of them... > > On Oct 28, 4:21 am, Tim Peierls <[email protected]> wrote: > > > > > I don't have time to do it, and I don't think anyone else is working > > on it ... go for it! (I gave up when it wasn't a simple recompile.) > > > There are a number of things I would do differently given the new > > features of Guice 2.0, but maybe a minimal patch that works is the > > best thing for now. > > > --tim > > > On Oct 27, 9:31 am, Patrick Lightbody <[email protected]> wrote: > > > > Anyone doing this? The DWR integration code is still on Guice 1.0 and > > > when I tried upgrading I got quite a few errors. Before I dive in to > > > this and send the DWR guys a patch, just wanted to check if others > > > have already tackled this problem. > > > > Patrick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
