4

I need to implement long-poll for a notification system, I current using Primefaces ajax framework but currently does not support long poll. I just wondering what is available for JSF developer if they want to implement long poll? Another question: between long poll and web push, for notification system, which one is prefer?

Note: I am using JSF 2.0, Java EE 6 and Glassfish 3.0.1

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
Thang Pham
  • 38,125
  • 75
  • 201
  • 285
  • How exactly is PrimeFaces' [``](http://www.primefaces.org/showcase/ui/poll.jsf) insufficient? – BalusC Oct 14 '10 at 20:59
  • 1
    I am using for my current implementation with the interval of 10sec, however I have read every where that it is a bad solution since it constant request to the server making the server sending empty respond back (creating overhead). For now, in the testing environment, it worked great, but I feel like I eventually need to migrate away from it. Since Catay Civic never really announce on when long poll will come out, I just try to see what else is out there – Thang Pham Oct 14 '10 at 21:20
  • @BalusC I am using `` to refresh a datatable. It works well, only that it constantly transfers the same unchanged data repeatedly. A server side event handler which could be used to block the response until there is a data change would save resources. – mjn Apr 09 '14 at 13:29

1 Answers1

0

Icefaces supports long polling. Your other choices would be to use open source libraries with JSF. Just search for long polling or reverse ajax and you would find some prominent libraries such as Comet and DWR. But as reverse ajax or long polling is pre-configured in Icefaces - i think it is your best choice. I also have a feeling that by now Primefaces already has reverse ajax feature.