Tuesday, February 6th, 2007
Jean-Francois Arcand has followed in the footsteps of Jetty with gCometd, a service to do Comet style applications in Java.
His article discusses “The Cometd framework and its Bayeux protocol is now supported starting with Grizzly 1.0.11 and GlassFish 9.1 b35. In this first blog, I will talk about the gCometd implementation, how to enable it and describe a dojo cometd enabled example.”
Dojo cometd example
To see the gCometd in action, you can download a sample here. This sample is an adapted Chat application available in Jetty, written by Greg Wilkins. Greg Wilkins is a member of the Cometd specs and the creator of Jetty. Jetty was the first cometd implementation and I’ve decided to adapt its cometd example for the purpose of this blog.
For Grizzly, just unzip the war file under the cometd folder. For GlassFish, just deploy the application. Then start your browser and point to the context-root of the sample (“/index.html” for Grizzly, “cometd-example/index.html” for GlassFish). An excellent tool to use to see what DOJO’s Cometd client is sending to gCometd is Firebug. I strongly recommend you install it. It really help understanding what is Bayeux!
Posted by Dion Almaer at 6:22 am