We upgraded from PF 3.5 to PF 5.1. In order to adapt the new Push interfaces I changed PushContext.push to EventBus.publish. In addition I added a class with @PushEndpoint("/myChannel"), but push messages don't work anymore.
Code: Select all
2014-11-05 18:25:34,402 WARN [org.atmosphere.cpr.MetaBroadcaster] No Broadcaster matches /myChannel. Message xxx WILL BE LOST. Make sure you cache it or make sure the Broadcaster exists before.
web.xml
Code: Select all
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
<init-param>
<description>Force Atmosphere to use WebSocket. (default: true)</description>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<description>Force Atmosphere to use WebSocket + Servlet 3.0 API. (default: false)</description>
<param-name>org.atmosphere.useWebSocketAndServlet3</param-name>
<param-value>false</param-value>
</init-param>
<!-- no difference if used or not -->
<!-- <init-param> -->
<!-- <param-name>org.atmosphere.cpr.asyncSupport</param-name> -->
<!-- <param-value>org.atmosphere.container.JBossWebSocketSupport</param-value> -->
<!-- </init-param> -->
<init-param>
<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
<param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
Code: Select all
<dependency org="org.atmosphere" name="atmosphere-runtime-native" rev="2.2.2" conf="runtime->default" transitive="false" />
<dependency org="org.atmosphere" name="atmosphere-compat-tomcat" rev="2.0.1" conf="runtime->default" transitive="false" />
<dependency org="org.atmosphere" name="atmosphere-compat-tomcat7" rev="2.0.1" conf="runtime->default" transitive="false" />
<dependency org="org.atmosphere" name="atmosphere-compat-jbossweb" rev="2.0.1" conf="runtime->default" transitive="false" />
<dependency org="org.atmosphere.jboss.as" name="jboss-as-websockets" rev="0.5" conf="runtime->default" transitive="false" />
using runtime-native
Code: Select all
2014-11-05 16:10:22,413 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] Running on PrimeFaces 5.1.2
2014-11-05 16:10:22,413 INFO [org.primefaces.extensions.application.PostConstructApplicationEventListener] Running on PrimeFaces Extensions 2.1.0
2014-11-05 16:10:22,414 INFO [com.ocpsoft.pretty.PrettyFilter] PrettyFilter starting up...
2014-11-05 16:10:23,360 INFO [com.ocpsoft.pretty.PrettyFilter] PrettyFilter initialized.
2014-11-05 16:10:23,376 WARN [org.atmosphere.util.IOUtils] META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
2014-11-05 16:10:23,388 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
2014-11-05 16:10:23,390 WARN [org.atmosphere.cpr.AtmosphereFramework] SessionSupport error. Make sure you define org.atmosphere.cpr.SessionSupport as a listener in web.xml instead
2014-11-05 16:10:23,401 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
2014-11-05 16:10:23,402 INFO [org.atmosphere.cpr.DefaultAnnotationProcessor] AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
2014-11-05 16:10:23,943 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
2014-11-05 16:10:24,008 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
2014-11-05 16:10:24,062 INFO [org.atmosphere.cpr.AtmosphereFramework] Auto detecting atmosphere handlers /WEB-INF/classes/
2014-11-05 16:10:24,364 INFO [org.atmosphere.cpr.AtmosphereFramework] Auto detecting WebSocketHandler in /WEB-INF/classes/
2014-11-05 16:10:24,395 INFO [org.atmosphere.cpr.AtmosphereFramework] Installing Default AtmosphereInterceptor
2014-11-05 16:10:24,457 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
2014-11-05 16:10:24,457 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
2014-11-05 16:10:24,459 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
2014-11-05 16:10:24,460 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
2014-11-05 16:10:24,460 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
2014-11-05 16:10:24,461 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
2014-11-05 16:10:24,462 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
2014-11-05 16:10:24,463 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
2014-11-05 16:10:24,463 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
2014-11-05 16:10:24,464 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
2014-11-05 16:10:24,465 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
2014-11-05 16:10:24,466 INFO [org.atmosphere.cpr.AtmosphereFramework] Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
2014-11-05 16:10:24,470 INFO [org.atmosphere.cpr.AtmosphereFramework] Using EndpointMapper class org.primefaces.push.impl.PushEndpointMapper
2014-11-05 16:10:24,470 INFO [org.atmosphere.cpr.AtmosphereFramework] Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
2014-11-05 16:10:24,471 INFO [org.atmosphere.cpr.AtmosphereFramework] Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
2014-11-05 16:10:24,472 INFO [org.atmosphere.cpr.AtmosphereFramework] Broadcaster Polling Wait Time 100
2014-11-05 16:10:24,473 INFO [org.atmosphere.cpr.AtmosphereFramework] Shared ExecutorService supported: true
2014-11-05 16:10:24,478 INFO [org.atmosphere.cpr.AtmosphereFramework] Messaging Thread Pool Size: Unlimited
2014-11-05 16:10:24,478 INFO [org.atmosphere.cpr.AtmosphereFramework] Async I/O Thread Pool Size: 200
2014-11-05 16:10:24,479 INFO [org.atmosphere.cpr.AtmosphereFramework] Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
2014-11-05 16:10:24,480 INFO [org.atmosphere.cpr.AtmosphereFramework] Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
2014-11-05 16:10:24,480 INFO [org.atmosphere.cpr.AtmosphereFramework] Invoke AtmosphereInterceptor on WebSocket message true
2014-11-05 16:10:24,481 INFO [org.atmosphere.cpr.AtmosphereFramework] HttpSession supported: true
2014-11-05 16:10:24,482 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
2014-11-05 16:10:24,482 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere is using async support: org.atmosphere.container.JBossWebSocketSupport running under container: JBoss Web/7.3.1.Final-redhat-1
2014-11-05 16:10:24,484 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere Framework 2.2.2 started.
2014-11-05 16:10:24,484 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
2014-11-05 16:10:24,486 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT
2014-11-05 16:10:24,486 INFO [org.atmosphere.cpr.AtmosphereServlet] AtmosphereServlet with native support for Tomcat 6/7 and JBossWeb Installed.
Code: Select all
2014-11-05 16:01:31,746 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] Running on PrimeFaces 5.1.2
2014-11-05 16:01:31,747 INFO [org.primefaces.extensions.application.PostConstructApplicationEventListener] Running on PrimeFaces Extensions 2.1.0
2014-11-05 16:01:31,751 INFO [com.ocpsoft.pretty.PrettyFilter] PrettyFilter starting up...
2014-11-05 16:01:33,033 INFO [com.ocpsoft.pretty.PrettyFilter] PrettyFilter initialized.
2014-11-05 16:01:33,055 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT
2014-11-05 16:01:33,057 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT
2014-11-05 16:01:33,062 WARN [org.atmosphere.util.IOUtils] META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
2014-11-05 16:01:33,077 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
2014-11-05 16:01:33,081 WARN [org.atmosphere.cpr.AtmosphereFramework] SessionSupport error. Make sure you define org.atmosphere.cpr.SessionSupport as a listener in web.xml instead
2014-11-05 16:01:33,095 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
2014-11-05 16:01:33,096 INFO [org.atmosphere.cpr.DefaultAnnotationProcessor] AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
2014-11-05 16:01:33,097 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
2014-11-05 16:01:33,098 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointProcessor being scanned: interface org.atmosphere.config.AtmosphereAnnotation
2014-11-05 16:01:33,099 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
2014-11-05 16:01:33,254 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class de.cursor.jevi.web.module.tasklist.util.push.TaskListPushResource being scanned: interface org.primefaces.push.annotation.PushEndpoint
2014-11-05 16:01:33,268 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy mapped to context-path / and Broadcaster Class org.atmosphere.cpr.DefaultBroadcaster
2014-11-05 16:01:33,269 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor [@PushEndpoint Interceptor] mapped to AtmosphereHandler org.primefaces.push.impl.PushEndpointHandlerProxy
2014-11-05 16:01:33,313 INFO [org.atmosphere.cpr.AtmosphereFramework] Auto detecting WebSocketHandler in /WEB-INF/classes/
2014-11-05 16:01:33,607 INFO [org.atmosphere.cpr.AtmosphereFramework] Installing Default AtmosphereInterceptor
2014-11-05 16:01:33,608 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
2014-11-05 16:01:33,608 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
2014-11-05 16:01:33,609 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
2014-11-05 16:01:33,609 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
2014-11-05 16:01:33,610 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
2014-11-05 16:01:33,611 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
2014-11-05 16:01:33,611 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
2014-11-05 16:01:33,612 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
2014-11-05 16:01:33,612 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
2014-11-05 16:01:33,613 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
2014-11-05 16:01:33,613 INFO [org.atmosphere.cpr.AtmosphereFramework] org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
2014-11-05 16:01:33,613 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor Track Message Size Interceptor using | with priority BEFORE_DEFAULT
2014-11-05 16:01:33,614 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT
2014-11-05 16:01:33,614 INFO [org.atmosphere.cpr.AtmosphereFramework] Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
2014-11-05 16:01:33,616 INFO [org.atmosphere.cpr.AtmosphereFramework] Using EndpointMapper class org.primefaces.push.impl.PushEndpointMapper
2014-11-05 16:01:33,616 INFO [org.atmosphere.cpr.AtmosphereFramework] Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
2014-11-05 16:01:33,617 INFO [org.atmosphere.cpr.AtmosphereFramework] Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
2014-11-05 16:01:33,617 INFO [org.atmosphere.cpr.AtmosphereFramework] Broadcaster Polling Wait Time 100
2014-11-05 16:01:33,617 INFO [org.atmosphere.cpr.AtmosphereFramework] Shared ExecutorService supported: true
2014-11-05 16:01:33,618 INFO [org.atmosphere.cpr.AtmosphereFramework] Messaging Thread Pool Size: Unlimited
2014-11-05 16:01:33,618 INFO [org.atmosphere.cpr.AtmosphereFramework] Async I/O Thread Pool Size: 200
2014-11-05 16:01:33,619 INFO [org.atmosphere.cpr.AtmosphereFramework] Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
2014-11-05 16:01:33,619 INFO [org.atmosphere.cpr.AtmosphereFramework] Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
2014-11-05 16:01:33,619 INFO [org.atmosphere.cpr.AtmosphereFramework] Invoke AtmosphereInterceptor on WebSocket message true
2014-11-05 16:01:33,620 INFO [org.atmosphere.cpr.AtmosphereFramework] HttpSession supported: true
2014-11-05 16:01:33,620 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere is using org.primefaces.push.impl.PushObjectFactory@14b2f8da for dependency injection and object creation
2014-11-05 16:01:33,620 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere is using async support: org.atmosphere.container.JBossAsyncSupportWithWebSocket running under container: JBoss Web/7.3.1.Final-redhat-1
2014-11-05 16:01:33,621 INFO [org.atmosphere.cpr.AtmosphereFramework] Atmosphere Framework 2.2.2 started.
2014-11-05 16:01:33,621 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
2014-11-05 16:01:33,623 INFO [org.atmosphere.cpr.AtmosphereFramework] Installed AtmosphereInterceptor @PushEndpoint Interceptor with priority AFTER_DEFAULT
Code: Select all
2014-11-05 16:01:33,097 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointMapper being scanned: interface org.atmosphere.config.service.EndpointMapperService
2014-11-05 16:01:33,098 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointProcessor being scanned: interface org.atmosphere.config.AtmosphereAnnotation
2014-11-05 16:01:33,099 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class org.primefaces.push.impl.PushEndpointInterceptor being scanned: interface org.atmosphere.config.service.AtmosphereInterceptorService
2014-11-05 16:01:33,254 INFO [org.atmosphere.cpr.AnnotationHandler] Found Annotation in class de.cursor.jevi.web.module.tasklist.util.push.TaskListPushResource being scanned: interface org.primefaces.push.annotation.PushEndpoint
This list is empty using runtime-native and filled using runtime. The annotation map is filled by AnnotationScanningServletContainerInitializer.onStartup(Set<Class<?>> classes, ServletContext servletContext).
Code: Select all
{interface org.atmosphere.config.AtmosphereAnnotation=[class org.atmosphere.annotation.WebSocketProcessorServiceProcessor, class org.atmosphere.annotation.BroadcasterCacheListenererviceProcessor, class org.atmosphere.annotation.AtmosphereServiceProcessor, class org.atmosphere.annotation.EndpointMapperServiceProcessor, class org.atmosphere.annotation.BroadcasterListenerServiceProcessor, class org.primefaces.push.impl.PushEndpointProcessor, class org.atmosphere.annotation.AtmosphereHandlerServiceProcessor, class org.atmosphere.annotation.ManagedServiceProcessor, class org.atmosphere.annotation.AsyncSupportListenerServiceProcessor, class org.atmosphere.annotation.MeteorServiceProcessor, class org.atmosphere.annotation.BroadcasterServiceProcessor, class org.atmosphere.annotation.BroadcasterCacheInspectorServiceProcessor, class org.atmosphere.annotation.AtmosphereInterceptorServiceProcessor, class org.atmosphere.annotation.BroadcasterFactoryServiceProcessor, class org.atmosphere.annotation.BroadcastFilterServiceProcessor, class org.atmosphere.annotation.BroadcasterCacheServiceProcessor, class org.atmosphere.annotation.AsyncSupportServiceProcessor, class org.atmosphere.annotation.WebSocketProtocolServiceProcessor, class org.atmosphere.annotation.WebSocketHandlerServiceProcessor], interface org.atmosphere.config.service.EndpointMapperService=[class org.primefaces.push.impl.PushEndpointMapper], interface org.atmosphere.config.service.AtmosphereInterceptorService=[class org.primefaces.push.impl.PushEndpointInterceptor]}
Does anybody know the reason of this behavior? Why is the AnnotationScanningServletContainerInitializer not called using atmosphere-runtime-native.jar?
Best regards
Dennis