#11500 closed defect (wontfix)
dojox cometd simultaneous publish messages are lost
Reported by: | pgpatrudu | Owned by: | Greg Wilkins |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | DojoX Cometd | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When two are more publishers publish a message simultaneously on a topic, then only one message is received by the subscriber of the topic.
Simultaneous means that publish is driven from two browsers on two different systems. Subscriber could reside on any one of the two systems or on a third system.
Dojo Version 1.4.3; Browsers used are IE 7 & Mozilla 3.6.8.
Code is from samples of dojox website & internet; In the following code : "my-cometd3" is my application folder; "cometd" is url pattern and points to sun's servlet on glassfish : com.sun.grizzly.cometd.servlet.CometdServlet?
<html>
<head> <script type="text/javascript" src="dojo/dojo.js"></script> <script src="req.js"></script> <script type="text/javascript">
dojo.require("dojox.cometd"); dojox.cometd.init("/my-cometd3/cometd");
function pubcontent() {
parse request url var FORM_DATA = createRequestObject();
get topic & text var topic = FORM_DATAtopic?; var text = FORM_DATAtext?; dojox.cometd.publish(topic, { test: text } );
alert("content published:" + topic + ":" + text);
}
</script> </head>
<body onLoad="pubcontent();"> </body>
</html>
<html>
<head> <script type="text/javascript" src="dojo/dojo.js" djConfig="parseOnLoad: true"></script> <script src="req.js"></script> <script type="text/javascript">
dojo.require("dojo.io.script"); dojo.require("dojox.cometd"); dojox.cometd.init("/my-cometd3/cometd");
var publishHandler = function(msg) {
dojo.byId('msgbox').value = msg.data.test; dojo.byId("msgbox").innerHTML += msg.data.test + "<BR />";
}
function subcontent() {
parse request url var FORM_DATA = createRequestObject();
get topic & text var topic = FORM_DATAtopic?;
dojox.cometd.subscribe(topic, publishHandler);
alert("done subscribing:" + topic);
}
</script> </head>
<body onLoad="subcontent();">
<div id="msgbox"></div>
</body>
</html>
Attachments (5)
Change History (8)
Changed 10 years ago by
Attachment: | receive5.html added |
---|
Changed 10 years ago by
Attachment: | sendreq.html added |
---|
Changed 10 years ago by
Changed 10 years ago by
Attachment: | sun-web.xml added |
---|
Changed 10 years ago by
Attachment: | channels.xml added |
---|
comment:1 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
One last question.
Can the cometd I download run on Glassfish, - OR - Do I have to change by backend server from GlassFish? to Jetty?
Thanks & Regards P G Patrudu
comment:3 Changed 10 years ago by
Thank you very much for the suggestion. It worked perfectly on GlassFish? V3, almost out of box; Problem resolved.
Sorry but the cometd client included with the dojo 1.4.3 release is now very much out of date. We have also never supported the com.sun.grizzly server side as that was a fork from an early version of our server side code.
I suggest that you goto cometd.org and download one of the latest stable releases 1.1.x,which come with a dojox.cometd module that replaces the one that ships with dojo and works with a supported back end.