Нажатие PrimeFaces 5: среда выполнения-native не работает

#primefaces #atmosphere

#primefaces #атмосфера

Вопрос:

После перехода с PF 4 на PF 5 push перестал работать, я получаю ошибку «Нет совпадений с вещателем …».

Сначала я подумал, что это будет какая-то несовместимость со старым push API, но это происходит и с новым API.

Замена atmosphere-runtime-native на нажатие по умолчанию atmosphere-runtime работает, но это не решение, потому что у меня были некоторые проблемы с этим в процессе производства.

Протестировано с PF 5.0.3 Atmosphere 2.1.6 Tomcat 7.0.52.

Нужна ли мне какая-то дополнительная конфигурация или зависимость для использования atmosphere-runtime-native с PrimeFaces 5?

Спасибо

журнал сервера: (используя пример уведомления из PrimeFaces showcase)

 [http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.DefaultAnnotationProcessor - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.DefaultAnnotationProcessor - Found Annotation in org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.DefaultAnnotationProcessor - Found Annotation in org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting atmosphere handlers /WEB-INF/classes/
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptor
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework -    org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Using EndpointMapper class org.primefaces.push.impl.PushEndpointMapper
[http-nio-8080-exec-7] WARN org.atmosphere.cpr.AtmosphereFramework - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Messaging Thread Pool Size: Unlimited
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Async I/O Thread Pool Size: 200
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - HttpSession supported: false
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket running under container: Apache Tomcat/7.0.52
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 2.1.6 started.
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - 

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

[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT 
[http-nio-8080-exec-7] INFO org.atmosphere.cpr.AtmosphereServlet - AtmosphereServlet with native support for Tomcat 6/7 and JBossWeb Installed.
[Thread-9] INFO org.atmosphere.cpr.AtmosphereFramework - Latest version of Atmosphere's JavaScript Client 2.2.2
[http-nio-8080-exec-3] WARN org.atmosphere.cpr.MetaBroadcaster - No Broadcaster matches /notify. Message javax.faces.application.FacesMessage@1e64262c WILL BE LOST. Make sure you cache it or make sure the Broadcaster exists before.
  

Комментарии:

1. Вы решили это? У меня такая же проблема.

Ответ №1:

Решением было переключение на обычную среду выполнения.

Более подробная информация здесь: https://code.google.com/p/primefaces/issues/detail?id=7189