我正在使用Atmosphere for GWT 2.1.0-RC2,当我刷新时,我正在体验浏览器(Firefox 24+和Chrome 30)。这在生产和GWT开发模式中都会发生。
查看浏览器控制台,我看到这个连接挂起了:
http://localhost:8080/atmosphere/rpc?site-id=MERGEFOLDER:adminA7559865-3550-4A7D-A60E-7208CFE28FFE&site-type=com.j.apps.merge.server.MergeFolderCollabSite&X-Atmosphere-Transport=close&X-Atmosphere-tracking-id=bcdbf745-cf61-4ca7-92ed-0df8828931ea&_=1395341362393
直接在它之后出现错误:
The connection to ws://localhost:8080/atmosphere/rpc?site-id=MERGEFOLDER:adminA7559865-3550-4A7D-A60E-7208CFE28FFE&site-type=com.j.apps.merge.server.MergeFolderCollabSite&X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.0.5-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&Content-Type=text/x-gwt-rpc;%20charset=UTF-8&X-atmo-protocol=true was interrupted while the page was loading.
http://localhost:8080/atmosphere-min.js
Line 259
我一直在四处寻找,试图找出为什么会发生这种情况但却没有找到任何线索。
非常感谢任何帮助。
谢谢!
答案 0 :(得分:0)
我在氛围2.1.2,GWT和JBoss时遇到了同样的问题,最后注意到Web应用程序启动时出现了警告:
"Found multiple containers, please specify which one to use: org.atmosphere.container.JettyCometSupport, org.atmosphere.container.JBossWebCometSupport, org.atmosphere.container.NettyCometSupport, until you do, Atmosphere will use:class org.atmosphere.container.JettyCometSupport".
我在web.xml中明确设置了异步支持类:
<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>
<param-value>org.atmosphere.container.JBossWebCometSupport</param-value>
</init-param>
和刷新正在按预期工作。