james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Carrasco MoƱino <man...@apache.org>
Subject Re: Should use Injector to inject Service-s and Locator-s in the RF
Date Wed, 18 Jul 2012 06:32:12 GMT
Actually we already use a GuiceServletContextListener so what you have to
do is to remove the /gwtRequest servlet-mapping from the web.xml so as it
is routed it via our guice listener, then serve that path in
the DispatchServletModule, despite the name of this class it it is not a
gwt-dispatcher class, in fact it should be call GuiceWebModule.

- your configuration should look like:
    bind(HupaFactoryServlet.class).in(Singleton.class);
    serve("/gwtRequest", "/hupa/gwtRequest").with(HupaFactoryServlet.class);

- create the HupaFactoryServlet and use injection in the way tbroyer says i
the post
public class HupaFactoryServlet extends RequestFactoryServlet {
  implement your ServiceLayerDecorator
}

- Manolo




On Wed, Jul 18, 2012 at 7:47 AM, echo <echowdx@gmail.com> wrote:

> Hi manolo,
> I updated the repository with your help. One problem about DI:
> It is found that we must inject IMAPStoreCache when I tried to use the it
> like org.apache.hupa.server.handler.AbstractSessionHandler. That means I
> must implement some inject stuff to benefit with Inject. What's I want to
> know is whether I have to implement a new one like here[1]<https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/9W_masZUUjc>instead
of the gwt-dispath's or something have been done I can referred.
>
> [1]
> https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/9W_masZUUjc
>
>
> --
> *echo*
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message