I've downloaded both the cometd bayeux example (with BayeuxExternalServlet.java) and also Shing's cometdmsgtest example, and I just cannot get them to work correctly. The bayeux client to client code works fine, but whenever I try to communicate from servlet to client it will not work correctly.
I'm using glassfish v3 prelude, and netbeans 6.5.1. I believe it's the same problem encountered in this thread:
http://markmail.org/message/2kvh6ptjikh5gcpf#query:+page:1+mid:oyikpq2ity74av74+state:results
To give some more detail:
The cometdmsgtest worked when I first tried it, but the server message would not be displayed on the echo-client until an action occurred on the client (i.e. until i submitted a post) and then it would appear once the echo returned.
BayeuxExternalServlet server functionality did not work at all when I first tried it, and I had to change the private String channel ="/chat/demo"; to a contextPath variable assigned to config.getServletContext().getContextPath() + cometUrlPattern; with cometUrlPattern being "cometd". Then it exhibited the same functionality as shing's cometdmsgtest, i.e. it sent the message but would not appear until the client made a chat post.
Setting deliverResponse.setFinished(true); gives a method not found error, and I've tried older versions of the grizzly jars and they give the same error. Shing stated on his blog that deliverResponse.setFinished(true); does not need to be invoked anymore.. but if not then I'm not sure what the fix here is.
Thanks,David
_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009