i know this is an old thread, but i thought i should leave my thoughts
somewhere.
i was having problems with @Inject or @Autowired not working because of who
is managing the servlet.
my friend took a look at your previous posts and whipped this up and it
seems to be working great:
public class MyServiceLocator implements ServiceLocator {
public Object getInstance(Class<?> clazz) {
HttpServletRequest request = RequestFactoryServlet.getThreadLocalRequest();
ApplicationContext context =
WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
//we should probably check class for null and return something the client
can deal with
// just in case
return context.getBean(clazz);
}
}
and so far its working with two services pretty well. i dont know a whole
lot about spring or gwt requestfactory but i thought this might be helpful
to someone
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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-web-toolkit?hl=en.