<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>

I would try using
DWR
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,
Spring
,
Mule
, and DWR.