0

我能够在我的 Liberty 配置文件中部署一个示例 Websocket 应用程序,并且它按测试工作。然后,我尝试将相同的应用程序部署到真正的WAS v8.5.5.4(到目前为止,我知道WAS 8.5.5.4 支持 websocket)。看起来应用程序已成功部署并且可以访问网页,但 WEBSOCKET 功能无法正常工作,例如我的 Web 套接字客户端无法与服务器连接。下面的一些SystemOut.log尾部:

[8/14/15 9:45:49:039 EDT] 00000095 AdminHelper   A   ADMN1008I: An attempt is made to start the WebsocketDemo-1_war application. (User ID = defaultWIMFileBasedRealm/debnatp)
[8/14/15 9:45:49:050 EDT] 00000095 CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=WebsocketDemo-1_war in BLA WebSphere:blaname=WebsocketDemo-1_war.
[8/14/15 9:45:49:059 EDT] 00000095 ApplicationMg A   WSVR0200I: Starting application: WebsocketDemo-1_war
[8/14/15 9:45:49:059 EDT] 00000095 ApplicationMg A   WSVR0204I: Application: WebsocketDemo-1_war  Application build level: Unknown
[8/14/15 9:45:49:073 EDT] 00000095 webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: WebsocketDemo-1.war.
[8/14/15 9:45:49:081 EDT] 00000095 WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/WebsocketDemo
[8/14/15 9:45:49:089 EDT] 00000095 webcontainer  I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module null has been bound to default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443].
[8/14/15 9:45:49:092 EDT] 00000095 ApplicationMg A   WSVR0221I: Application started: WebsocketDemo-1_war
[8/14/15 9:45:49:092 EDT] 00000095 CompositionUn A   WSVR0191I: Composition unit WebSphere:cuname=WebsocketDemo-1_war in BLA WebSphere:blaname=WebsocketDemo-1_war started.
[8/14/15 9:45:49:216 EDT] 00000095 SystemOut     O req=get&sessionVariable=com_ibm_ws_inlineMessages
[8/14/15 9:46:14:457 EDT] 00000095 WebContainer  E com.ibm.ws.webcontainer.internal.WebContainer handleRequest SRVE0255E: A WebGroup/Virtual Host to handle /WebsocketDemo/echo has not been defined.

有什么想法或建议吗?

4

1 回答 1

1

目前,只有 WebSphere Liberty 配置文件支持 websocket。完整(又名经典)WebSphere Application Server 还不支持 websocket。检查这个页面

计划在经典 WebSphere Application Server 中支持 websockets 和 Java EE 7,但尚不可用。

如果您需要 websockets 功能,则必须使用 Liberty Profile 或 Liberty Core 版本。

顺便提一句。完全支持 WebSphere Liberty 用于生产。因此,如果您拥有经典的 WebSphere 8.5.5 许可证,则可以在生产中使用 Liberty。

于 2015-08-14T14:27:28.317 回答