-
1. Re: RF4, a4j:push, and broadcast
bleathem Aug 26, 2013 2:53 PM (in response to liuliu)Have you followed any of the showcase push examples?
http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=push&sample=pushCdi&skin=blueSky
-
2. Re: RF4, a4j:push, and broadcast
liuliu Aug 27, 2013 5:37 AM (in response to bleathem)yes, it works with cdi push.
but could you enlighten me on the difference between a richface message queue and a cdi event, and do they have a scope? how to tell the push to use a websocket connection than a long-polling mothod?
thanks
-
3. Re: RF4, a4j:push, and broadcast
bleathem Aug 27, 2013 1:43 PM (in response to liuliu)RichFaces push has the option to work with JMS, where you publish a message to a JMS message queue and that message observed by RichFaces Push and transported via Comet to the client. Using JMS with RichFaces push gives you all the usual JMS advantages: Asynchronous, reliable, etc.
RichFaces push also has the option to work without JMS. You can use the RichFaces Push API to transport messages directly to the client.
CDI is an API. You can use the RichFaces push CDI API with or without JMS.
To use Websockets, you'll have to deploy to a container that uses websockets. Then Atmosphere should recognize and use websockets over comet - it's been a while since I played with this, so feel free to post back if you are having trouble getting the websockets going.
Clear?
-
4. Re: RF4, a4j:push, and broadcast
sjashe Oct 21, 2013 6:49 AM (in response to bleathem)Not fully clear myself..
If you use CDI for push, it only stays within the session, right? To push a message to all users you would need something like Push using JMS? or can Push CDI events do such?
Using the showcase examples and richfaces documentation, I have succeeded in getting JMS Push working.. except that right now the event.fire succeeds in sending a message to the topic, but only push consumers on remote machines receive it. A consumer running on the server machine does not.
Does atmosphere work differently for a local connection vs remote?