Getting GWT and Grails with Atmosphere plugin to work together
I was able to successfully get the GWT Atmosphere demo project as well as the Grails atmosphere project up and running. However, when using the Grails backend to power up the GWT Atmosphere client, it stops working with the following message:
comet.beforeDisconnected
comet.disconnected
comet.er开发者_开发问答ror [connected=false] (0)0
comet.error [connected=true] (-1)Invalid message received: <!-- ---------------------------------------------------------------- http://github.com/Atmosphere ------------------------------------------------------------------------ -->
comet.beforeDisconnected
comet.error [connected=true] (-1)Expecting disconnection but received message: <!-- Welcome to the Atmosphere Framework. To work with all the browsers when suspending connection, Atmosphere must output some data to makes WebKit based browser working.-->
Any advice?
Do you have some more output available? Maybe an exception?
Does it happen while broadcasting a message? Maybe you have configured the suspended connection to resume on broadcast.
Maybe the problem is the received message. You could try to deactivate writing the message when suspending, e.g.:
new SuspendResponse.SuspendResponseBuilderString... .outputComments(false) ... .build()
It was all about configuring the CometHandler correctly. It's still not working as we expect it to, but it's at least working the same way as manually injecting the AtmosphereServlet
精彩评论