tintin
tintin

Reputation: 5867

Which Java EE tech to use to create rich client application?

I am working on a rich client side Java EE application in which most of the processing takes place on the client side.

A typical scenario for this would be:

Is there a way we can use the server to push the messages directly to the clients to be notified (like the way gmail notification works)?

I know we can use JMS to publish the messages, but that would still require the client to make AJAX calls to the server to get the prepared message. Is there any other way I can achieve this?

Upvotes: 0

Views: 410

Answers (1)

Beryllium
Beryllium

Reputation: 12998

Have a look at Using Asynchronous Servlets for Web Push Notifications, a tutorial from Oracle (I have found the tutorial in this answer):

  • This requires AJAX on the client side, but the HTTP connection remains open.
  • The asynchronous job on the server side is receiving the JMS messages from the queue, and can send notifications to the browser.

If you can use other libraries, this question shows some ways to integrate JavaScript and JMS.

Related question: How do Facebook/gmail send real time notifications

Upvotes: 2

Related Questions