Problem with PrimeFaces push + JMSBroadcaster

UI Components for JSF
Post Reply
FkJ
Posts: 183
Joined: 08 Jan 2010, 19:16

19 May 2014, 14:04

Hi,

I'm trying to integrate JMS + PrimeFaces push. I already got it working using my own message listener, but I'd like to avoid some boilerplate code using the Atmosphere JMSBroadcaster.

Configurations seems to be fine and according to the log the message seems to be correctly broadcasted (at least the JMS part).

Problem is that the onMessage JavaScript handler from PrimeFaces socket component is not called.

I'm using atmosphere-runtime-native 2.1.4, atmosphere-jms 2.1.2 and primefaces 4.0.13.

Any ideas?

Thanks


Atmosphere log:

Code: Select all

24164 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Detected a Broadcaster org.atmosphere.plugin.jms.JMSBroadcaster on the classpath. This broadcaster will be used by default and will override any annotated resources. Set org.atmosphere.cpr.Broadcaster.scanClassPath to false to change the behavior
24175 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
24176 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.DefaultAnnotationProcessor - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
24176 [http-bio-8080-exec-5] WARN org.atmosphere.cpr.DefaultAnnotationProcessor - Unable to detect annotations. Application may fail to deploy.
24176 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting atmosphere handlers /WEB-INF/classes/
24228 [http-bio-8080-exec-5] WARN org.atmosphere.cpr.AtmosphereFramework - Missing META-INF/atmosphere.xml but found the Jersey runtime. Starting Jersey
24240 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Looking up Connection Factory java:comp/env/jms/ConnectionFactory
24279 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Looking up topic: jms/FooTopic
24637 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - JMS created for topic jms/FooTopic
24637 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Create JMS consumer: atmosphere
24695 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Consumer created for topic jms/FooTopic, with filter BroadcasterId = 'atmosphere'
24697 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path /* and Broadcaster Class org.atmosphere.plugin.jms.JMSBroadcaster
24697 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Auto detecting WebSocketHandler in /WEB-INF/classes/
24711 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
24720 [http-bio-8080-exec-5] INFO org.atmosphere.handler.ReflectorServletProcessor - Installing Servlet com.sun.jersey.spi.container.servlet.ServletContainer
Mai 19, 2014 9:23:00 AM com.sun.jersey.api.core.PackagesResourceConfig init
Informações: Scanning for root resource and provider classes in the packages:
  br.com.spdata.test
  br.com.spdata.test
Mai 19, 2014 9:23:00 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
Informações: Root resource classes found:
  class br.com.spdata.test.MyResource
Mai 19, 2014 9:23:00 AM com.sun.jersey.api.core.ScanningResourceConfig init
Informações: No provider classes found.
Mai 19, 2014 9:23:00 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
Informações: Initiating Jersey application, version 'Jersey: 1.17.1 02/28/2013 12:47 PM'
Mai 19, 2014 9:23:00 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
Informações: Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration:
  class org.atmosphere.jersey.AtmosphereResourceConfigurator
25351 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptor
25352 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
25352 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
25352 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
25353 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
25353 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
25353 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
25353 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
25354 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
25354 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
25354 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
25354 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
25354 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
25357 [http-bio-8080-exec-5] 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
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Default Broadcaster Class: org.atmosphere.plugin.jms.JMSBroadcaster
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Messaging Thread Pool Size: Unlimited
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Async I/O Thread Pool Size: 200
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - HttpSession supported: true
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
25357 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.Tomcat7Servlet30SupportWithWebSocket running under container: Apache Tomcat/7.0.52 using javax.servlet/3.0
25358 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 2.1.4 started.
25358 [http-bio-8080-exec-5] 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

25359 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Atmosphere LifeCycle with priority AFTER_DEFAULT 
25359 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
25360 [http-bio-8080-exec-5] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor UUID Tracking Interceptor with priority AFTER_DEFAULT 
25403 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Looking up Connection Factory java:comp/env/jms/ConnectionFactory
25403 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Looking up topic: jms/FooTopic
25421 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - JMS created for topic jms/FooTopic
25421 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Create JMS consumer: /colaborador149
25430 [http-bio-8080-exec-5] INFO org.atmosphere.plugin.jms.JMSBroadcaster - Consumer created for topic jms/FooTopic, with filter BroadcasterId = '/colaborador149'
27372 [Thread-9] INFO org.atmosphere.cpr.AtmosphereFramework - Latest version of Atmosphere's JavaScript Client 2.2.0

atruszek
Posts: 11
Joined: 21 Jul 2010, 14:11

02 Mar 2015, 18:10

Hi,

can You send some piece of code how do You integrated JMS with Push?

]Here You can see my doubts...
http://stackoverflow.com/questions/2879 ... ces-client

Thanks Bye
PrimeFaces 3.2
Testing on: Tomcat 6, Windows 7 x64, MySQL 5.x

FkJ
Posts: 183
Joined: 08 Jan 2010, 19:16

02 Mar 2015, 19:02

Hi,

I had no luck with JMSBroadcaster, so I wrote the JMS code myself: http://forum.primefaces.org/viewtopic.p ... 0&start=10

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests