1

basically i have read some samples, but all are self contained in one servlet. such as: use doGet to establish the long polling connection, and then use doPost to trigger the event to notify all suspended connections.

Here is my question: I have other web actions programming in spring mvc, in the spring mvc controller a user post a message via /message/post, how can I make this action to trigger the atmosphere handler to notify the suspended connections?

StaxMan
  • 113,358
  • 34
  • 211
  • 239
Sean Xiong
  • 135
  • 2
  • 3
  • 7

1 Answers1

2

But what about non web components (EJB, JMS, Akka/Scala Actor, etc.) or web component with different scope (another web application, another Servlet, etc.)? They can also generate server sides events by using Atmosphere’s BroadcasterFactory

http://jfarcand.wordpress.com/2010/06/18/trick-of-the-friday-1-delivering-server-side-events-to-your-websocketcomet-application/

Tahir Akhtar
  • 11,385
  • 7
  • 42
  • 69
  • Yes, this should work, just remember to do your lookup for an AkkaBroadcaster: http://github.com/jboner/akka/blob/master/akka-http/src/main/scala/AkkaBroadcaster.scala – Viktor Klang Jun 21 '10 at 15:25