how to trigger notification from other framework in atmosphere (comet)?

柔情痞子 提交于 2019-12-04 14:35:49

问题


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?


回答1:


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/



来源:https://stackoverflow.com/questions/3068078/how-to-trigger-notification-from-other-framework-in-atmosphere-comet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!