目前,我们正在将JavaEE应用程序从Tomcat服务器迁移到Wildfly服务器 . 我们遇到一些问题 . 其中一个最大的问题是我们没有在Atmopshere的WebSockets下运行Primefaces . 我们总是依赖长期民意调查 .
Chrome Netwerk Dump

作为测试,我们复制了以下Git-Project:https://github.com/belalgalal/Blogging/tree/master/PrimePushNotify并对POM文件进行以下调整 .

...
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime</artifactId>
    <version>2.4.12</version>
</dependency>
... 
<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>6.0</version>
</dependency>
...

必须进行哪些设置或配置才能使用Primefaces Push with Websockets?

产品概要:

  • IDE:Eclipse

  • Build:Maven

  • 服务器:Wildfly 10.1

  • Primefaces 6.0

  • 大气2.4.12

跟踪自卸 - 大气

12:02:39,791 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 61) Initializing AtmosphereFramework
12:02:39,796 INFO  [org.atmosphere.util.IOUtils] (ServerService Thread Pool -- 61) Successfully loaded and installed META-INF/services/org.atmosphere.cpr.AtmosphereFramework
12:02:39,871 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Mojarra 2.2.13.SP1 20160303-1204 für Kontext '/PrimePushNotify-0.0.1-SNAPSHOT' wird initialisiert.
12:02:40,916 INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 61) Running on PrimeFaces 6.0
12:02:40,960 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
12:02:40,960 INFO  [org.atmosphere.cpr.DefaultAnnotationProcessor] (ServerService Thread Pool -- 61) AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
12:02:40,961 INFO  [org.atmosphere.cpr.AnnotationHandler] (ServerService Thread Pool -- 61) Found Annotation in class org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
12:02:40,962 INFO  [org.atmosphere.cpr.AnnotationHandler] (ServerService Thread Pool -- 61) Found Annotation in class org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
12:02:40,962 INFO  [org.atmosphere.cpr.AnnotationHandler] (ServerService Thread Pool -- 61) Found Annotation in class org.primefaces.push.impl.PushEndpointProcessor being scanned: interface org.atmosphere.config.AtmosphereAnnotation
12:02:40,966 INFO  [org.atmosphere.cpr.AnnotationHandler] (ServerService Thread Pool -- 61) Found Annotation in class com.ithinkisink.primepush.notify.NotifyResource being scanned: interface org.primefaces.push.annotation.PushEndpoint
12:02:40,976 INFO  [org.atmosphere.util.ForkJoinPool] (ServerService Thread Pool -- 61) Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
12:02:40,981 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy mapped to context-path /notify and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
12:02:40,981 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
12:02:40,983 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Auto detecting WebSocketHandler in /WEB-INF/classes/
12:02:40,986 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
12:02:40,988 INFO  [org.atmosphere.container.JSR356AsyncSupport] (ServerService Thread Pool -- 61) JSR 356 Mapping path /primepush
12:02:40,990 INFO  [io.undertow.websockets.jsr] (ServerService Thread Pool -- 61) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /primepush
12:02:40,992 INFO  [io.undertow.websockets.jsr] (ServerService Thread Pool -- 61) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /primepush/{path0}
12:02:40,992 INFO  [io.undertow.websockets.jsr] (ServerService Thread Pool -- 61) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /primepush/{path0}/{path1}
12:02:40,992 INFO  [io.undertow.websockets.jsr] (ServerService Thread Pool -- 61) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /primepush/{path0}/{path1}/{path2}
12:02:40,992 INFO  [io.undertow.websockets.jsr] (ServerService Thread Pool -- 61) UT026005: Adding programmatic server endpoint class org.atmosphere.container.JSR356Endpoint for path /primepush/{path0}/{path1}/{path2}/{path3}
12:02:40,993 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installing Default AtmosphereInterceptors
12:02:40,993 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
12:02:40,993 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
12:02:40,994 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
12:02:40,994 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
12:02:40,996 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
12:02:40,996 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
12:02:40,997 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
12:02:40,997 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
12:02:40,998 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
12:02:40,998 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
12:02:40,998 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61)   org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
12:02:40,999 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
12:02:40,999 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT 
12:02:40,999 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
12:02:41,000 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT 
12:02:41,000 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
12:02:41,000 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
12:02:41,000 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.interceptor.HeartbeatInterceptor] (ServerService Thread Pool -- 61) HeartbeatInterceptor configured with padding value 'X', client frequency 60 seconds and server frequency 0 seconds
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Heartbeat Interceptor Support with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
12:02:41,001 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
12:02:41,002 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
12:02:41,002 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Using EndpointMapper class org.primefaces.push.impl.PushEndpointMapper
12:02:41,002 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
12:02:41,002 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
12:02:41,002 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Broadcaster Shared List Resources: false
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Broadcaster Polling Wait Time 100
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Shared ExecutorService supported: true
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Async I/O Thread Pool Size: 200
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
12:02:41,003 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
12:02:41,007 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Invoke AtmosphereInterceptor on WebSocket message true
12:02:41,007 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) HttpSession supported: false
12:02:41,007 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Atmosphere is using org.atmosphere.inject.InjectableObjectFactory for dependency injection and object creation
12:02:41,007 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: WildFly 2.2.0.Final - 1.4.0.Final using javax.servlet/3.0 and jsr356/WebSocket API
12:02:41,008 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) Atmosphere Framework 2.4.12 started.
12:02:41,008 INFO  [org.atmosphere.cpr.AtmosphereFramework] (ServerService Thread Pool -- 61) 

    For Atmosphere Framework Commercial Support, visit 
    http://www.async-io.org/ or send an email to support@async-io.org

12:02:41,013 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 61) WFLYUT0021: Registered web context: /PrimePushNotify-0.0.1-SNAPSHOT
12:02:41,035 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ojdbc7-driver" (runtime-name : "ojdbc7-12.1.0.2.jar")
12:02:41,053 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "PrimePushNotify-0.0.1-SNAPSHOT.war" (runtime-name : "PrimePushNotify-0.0.1-SNAPSHOT.war")
12:02:41,168 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
12:02:41,168 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
12:02:41,169 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 7760ms - Started 497 of 751 services (413 services are lazy, passive or on-demand)
12:02:41,275 INFO  [org.atmosphere.cpr.AtmosphereFramework] (Thread-90) Latest version of Atmosphere's JavaScript Client 2.3.1