在JBoss AS7中是否有使用WebSockets的示例? [英] Is there an example for utilization of WebSockets in JBoss AS7?
问题描述
在某处有一个示例,该示例针对JBoss Application Server使用此websocket实现> 7.1.2 https://github.com/mikebrock/jboss-websockets
Is there somewhere an example that utilizes this websocket implementation for JBoss Application Server > 7.1.2 https://github.com/mikebrock/jboss-websockets
我无法让它与那里的简短说明一起工作.
I can't get it to work with the brief description thats there.
我已经设置了WebSocketServlet并将其绑定到一个地址,然后当我尝试通过ws://从浏览器(最新稳定的Chrome)连接到Servlet时失败(不允许405访问),在wss://上没有任何反应,它保持连接状态,并且不会在客户端或服务器端引发任何错误.
I've already setup the WebSocketServlet and bound it to an address and then when I'm trying to connect to the Servlet from the Browser (newest stable Chrome) over ws:// it fails (405 access not allowed) and over wss:// nothing happens , it stays in the connecting state and does not throw any errors on client or server side.
如果还有另一种实现websocket servlet的方法,我会更加高兴.
我还看到您可以使用Jetty来运行它,如以下所述:
http://golovnin.blogspot.de/2012/04/jboss -7-and-websockets.html ,
但是我宁愿换另一种方式.
And if there's another way to implement websocket servlets I would be even happier.
I also saw that you can get it running with Jetty described in here:
http://golovnin.blogspot.de/2012/04/jboss-7-and-websockets.html,
but I'd rather do it the other way.
推荐答案
I've made a demo app here: https://github.com/eis/jboss-websocket-demo
这是一个简单的聊天.
It's a simple chat.
它仅使用JBoss内容,而不使用Jetty或其他解决方法.如自述文件所述,您需要启用本机jbossweb.
It uses JBoss stuff only, not Jetty or other workarounds. Like readme says, you need to enable native jbossweb.
这篇关于在JBoss AS7中是否有使用WebSockets的示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!