Architecture when using gwteventservice


New member
Hi all

I am working on an app which is using gwt for the front end and grails on the back. I have the standard rpc action/response service working fine but I would like to be able to send asynchronous notifications to the gui from grails, for example to implement progress of slow running actions. I think the gwteventservice would seem to be the ideal framework to use.

However, I am struggling a little working out how to integrate the framework into the grails environment. At the moment I have set up a grails EventController that extends the RemoteEventServiceServlet and implements my own MessengerRemoteService class (extending RemoteService as in the gwteventservice examples).

I then have a grails service which receives messsages from the back end (using hornetq) which I want to be able to update the gui.

So to link the two, I have injected the service into the controller, and then registered the controller with the service so that it can call the geteventservice.addEvent() method when a back end message is received.

Unfortunately I am getting this exception when I try to call addEvent:

No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

If anyone has any ideas what my cause this, or any experience of how to partition the controller and service classes in grails when using gwteventservice, then I would appreciate your help.