0

I'm searching a notifications system where my webservice REST can notify my JSF WebApp and reload some data and display them dynamicaly.

For more precisions,

  1. I have a entity SANDWICH_SHOP, and user can add a COMMAND for a SANDWICH_SHOP with his mobile (on an native application)
  2. If the sandwich shop is connected on the WebApp, he can see all commands of his SandwichShop, and i would like that datatable where all command are display automaticaly reload and display the news datas.

I tried a system with a servlet in my webapp, when the POST is done on the webservice, a request is made to my servlet, and i found the bean with the session and reload data. But it doesnt work cause HttpSession wasnt the same so i couldnt get my bean in my servlet (my bean was SessionScoped)

What's the best system i can use for this problem ? JMS ? WebSocket ? Thanks

Persilos
  • 122
  • 1
  • 16

1 Answers1

0

If you're looking for (near) realtime updates to any (or all) connected clients, then WebSockets would be a good solution to this (assuming the clients are web based). You can push a notification from the server out to any connected web browser client.

Kevin Hooke
  • 2,583
  • 2
  • 19
  • 33