title: How to architect push notifications to a Swing client from JAX-WS on GlassFish?
body: <p>I have a widely distributed java swing application that is a web service client from a JAX WebService EJB on a Glassfish 3.1.2 server.</p>
  
  <p>I want to be able to distribute a String notification to all users that stays active until they have read it. The notifications only need to exist within the Swing client.</p>
  
  <p>I have created a superuser web portal to enter the String data and save it to a database.</p>
  
  <p><strong>My question is</strong>:</p>
  
  <ol>
  <li>What is the best technology to (push)distribute this data String Notification to my clients?</li>
  <li>How should I arcitect the database to know if the notification has been viewed? (So I can stop showing the "New Notification" on the client)</li>
  </ol>
  
  <p><em>Or if there is a reference to a guide that would work wonderfully, I couldn't find one.</em></p>
  
  <p>My Ideas:</p>
  
  <ul>
  <li>Have the client call a webservice every 10 minutes to check if there are any new notifications</li>
  <li>For the database create a notification table and notifications seen. Link my users table to notifications seen table.  Notifications seen is very basic with just 3 columns: NotificationID, UserID, TimeSeen.</li>
  </ul>