I've had good luck with the second (non-invasive) approach. A coworker
of mine implemented the first (using Spring MVC) approach and it did
work for the most part. However, we aren't otherwise using Spring MVC
and don't have any broad expertise in it, so I was initially confused
when looking at it. Specifically, I didn't know about the relationship
between the servlet name and the "-servlet.xml" file, the contents of
which require some learning to understand (i.e.,
SimpleUrlHandlerMapping and its "mappings" property). I also didn't
like the additional wrapper GwtRpcController around the actual
service; it seems like an unnecessary layer. I think this setup keeps
you from having to extend RemoteServiceServlet, but you still have to
worry about GWT serialization of parameters and return values so I
don't see it as a big gain. Also, the proxy means that you lose
getThreadLocalRequest unless you add code to the GwtRpcController to
forward it to your service.
I like the non-invasive approach because it keeps the setup of the GWT-
RPC servlet exactly as explained in the GWT documentation. Your spring-
configured services don't change either. You just gain the ability to
inject those services into your GWT-RPC remote servlets.
I think it comes down to where you're coming from. If you already use
and like Spring MVC, you'll probably prefer the first approach. (I
hope someone with that perspective also responds to describe the
benefits of that setup.) If you like GWT and just need to integrate
with your spring-configured services, you'll probably prefer the
second approach.
-Brian
On Jun 8, 11:32 am, ezamur <
eza...@gmail.com> wrote:
> Hi all...
>
> I am new to GWT - had some contact with it earlier but not enough to
> say I am confident with it.
>
> My task is to investigate this technology and pair it with Spring
> framework. There are a lot of tutorials explaining how this can be
> done, but what is bothering me is I can't decide which approach to
> choose. For example, I've seen one using Spring's MVC (like this one:
http://technophiliac.wordpress.com/2008/08/24/giving-gwt-a-spring-in-...),
> but also other where integration is done without it (e.g.
http://code.google.com/p/gwt-spring-starter-app/)