title: How to send events (push notifications) from a Java EE application?
body: <p>I have a Java EE application where the model is updated very frequently from various sources. In addition I have a rich client application which triggers some actions via remote EJBs but which should also display the model changes ate least every second.</p>
  
  <p>What is the easiest/ best option for sending the changes from the Java EE application to Java client application? Till now I have the following options:</p>
  
  <ol>
  <li>polling a remote EJB every second from the client</li>
  <li>polling a servlet (Is it preferable to use json/ xml instead of java object serialization? Any other serialization?)</li>
  <li>websockets (Is it possible to send Java objects here? Or must the result be serialized to Json for for example?)</li>
  <li>tcp socket connection (The server would provide a port where the client connects to on startup. Model changes are send via standard object serialization. Is this "allowed" in a Java EE app?)</li>
  </ol>