title: Observer pattern with JSF/PrimeFaces
body: <p>Is there a recommended way of implementing the Observer pattern in JSF, i.e. forcing a UI update from the Java bean?</p>
  
  <p>I've taken a look at PrimePush, but none of their ShowCase examples seem to work with my browsers (e.g. FF 19.0), which is why I shied away from it.</p>
  
  <p>I am currently using a PrimeFaces poll to update the respective components in a regular interval. I was thinking about reducing the poll’s interval to "1" and having its action method block until the server is ready to push. Is that a good idea or will such long-running requests be canceled at some point?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p:poll interval="15" listener="#{fileBucket.keepAlive}" update=":download:files :expiryDateValue" oncomplete="updatePageIsValidForValue();" /&gt;
  </code></pre>