<p>Where can I find a guide for integrating JavaScript and JMS (Java Messaging Service)?</p>

<p>I would like a best practice or established technology that allows me to directly or indirectly receive messages from a topic and update a site based on the message. I was thinking of creating two components, a servlet for the Web module, and an MDB (Message-Driven Bean) for the EJB module. The web client will comsume messages from the JMS topic, and the MDB will handle the onMessage.</p>

<p>Does this sound correct? Have you seen any examples?</p>

<p>Edit: I am using ActiveMQ for the JMS.</p>

[{'answer_id': 66943, 'author': 'pjesi', 'author_id': 1296737, 'author_profile': 'https://Stackoverflow.com/users/1296737', 'pm_score': 1, 'selected': False, 'text': '<p>I would try using <a href="http://directwebremoting.org/" rel="nofollow noreferrer">DWR</a> to integrate JavaScript with your Java app. It makes Java to JavaScript communication transparent and only requires one servlet + configuration of what to expose. I haven´t done this with JMS, but it should work the same. There are three technologies that together solve all my integration problems, <a href="http://springframework.org" rel="nofollow noreferrer">Spring</a>, <a href="http://mulesource.org" rel="nofollow noreferrer">Mule</a>, and DWR.</p>\n'}, {'answer_id': 67047, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>You\'ll find some references to the Dojo/Bayeux approach here<br>\n<a href="http://www.pathf.com/blogs/2006/08/bayeux_a_json_p/" rel="nofollow noreferrer">http://www.pathf.com/blogs/2006/08/bayeux_a_json_p/</a></p>\n\n<p>If you\'re using WebSphere 6.0 or higher then the Web 2.0 Feature Pack includes an implementation.</p>\n'}, {'answer_id': 68981, 'author': 'Todd', 'author_id': 3803, 'author_profile': 'https://Stackoverflow.com/users/3803', 'pm_score': 3, 'selected': True, 'text': '<p>I think <a href="http://activemq.apache.org/ajax.html" rel="nofollow noreferrer">this</a> is your answer.  Looks like it is baked in to ActiveMQ.  I tried the examples and they seem to work.</p>\n\n<p><a href="http://activemq.apache.org/ajax.html" rel="nofollow noreferrer">http://activemq.apache.org/ajax.html</a></p>\n'}, {'answer_id': 101508, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>The <a href="http://www.seamframework.org/" rel="nofollow noreferrer">Seam framework</a> supports subscription to JMS topics from a JavaScript based client:</p>\n\n<p><a href="http://docs.jboss.com/seam/2.0.2.GA/reference/en-US/html/remoting.html#d0e14169" rel="nofollow noreferrer">http://docs.jboss.com/seam/2.0.2.GA/reference/en-US/html/remoting.html#d0e14169</a></p>\n'}]
['https://Stackoverflow.com/questions/66840', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1992/']