Rick Palkovic and I have written an article about a Comet application which allows users to watch and chat about a slide show. The Application loads the slide URLs from a RESTful Web Service and then uses dojo bayeux with Grizzly on Glassfish to publish the slides and/or text to all the slideshow subscribers. See RESTful Web Services and Comet.
RESTful Web Services and Comet
Sample Application using dojo, the Java API for Restful Web
Services JAX-RS, and the Java Persistence APIs
a RESTful Pet Catalog
This Sample Pet Store
Catalog application shows how to expose a Catalog as a
RESTful Web Service for remote client applications, and it shows how to
code a Dojo
client which gets and displays the Web Service responses in
a dynamic Ajax...