users@grizzly.java.net

Client Stream Update Issue with Grizzly Comet

From: <appu_abey_tom_at_yahoo.com>
Date: Fri, 24 Apr 2009 00:24:00 -0700 (PDT)

Hi All,

I have modified a the sample application grizzly-comet-chat from trunk/code/samples run using grizzly-comet-webserver.  I added a Timer to the existing class com.sun.grizzly.samples.comet.AjaxCometServlet to push the system-time  to the client(browser). It works fine initially and if I open 3 or 4 browsers and hit the refresh button on the broswer, that browser stops getting responses. For debugging I'm sending a unique clientId as a request param. Even if the browser didnt get any response , the server is logging(onEvent(..)) that its sending the response the to the browser with that clientId. More over when I close the browser, onInterrupt(..) method is getting invoked with the corrosponding clientId.
Just to make sure that its not a browser update issue, I used Charles Web Debugging Proxy and saw that the request (GET) stream is open and i'm not able to seen any responses from the server.
Also if I keep on opening new browsers, I get updates to the browser, but if I close one browser and open a new one or refresh existing one, that browser stop getting updates. All the existing ones get updates properly.
I have attached the source and the war file and environment details are given below.
OS: Win XP
Browsers: Firefox 3.x, IE 7
Container: grizzly-comet-webserver-1.9.15-SNAPSHOT.jar - started by the following command
java -jar D:/Repository/svn/grizzly/trunk/code/modules/bundles/comet/target/grizzly-comet-webserver-1.9.15-SNAPSHOT.jar -p 8181 -a target/grizzly-comet-chat.war com.sun.grizzly.samples.comet.AjaxCometServlet
I'm using the code from latest trunk. I built all the jars in my machine from the trunk code.
 
Am I missing something, or I'm doing something wrong?
 
Thank you for looking into this.
Tom