Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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)

receive5.html (805 bytes) - added by pgpatrudu 9 years ago.
sendreq.html (583 bytes) - added by pgpatrudu 9 years ago.
web.xml (846 bytes) - added by pgpatrudu 9 years ago.
sun-web.xml (295 bytes) - added by pgpatrudu 9 years ago.
channels.xml (1.2 KB) - added by pgpatrudu 9 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by pgpatrudu

Attachment: receive5.html added

Changed 9 years ago by pgpatrudu

Attachment: sendreq.html added

Changed 9 years ago by pgpatrudu

Attachment: web.xml added

Changed 9 years ago by pgpatrudu

Attachment: sun-web.xml added

Changed 9 years ago by pgpatrudu

Attachment: channels.xml added

comment:1 Changed 9 years ago by Greg Wilkins

Resolution: wontfix
Status: newclosed

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.

comment:2 Changed 9 years ago by pgpatrudu

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 9 years ago by pgpatrudu

Thank you very much for the suggestion. It worked perfectly on GlassFish? V3, almost out of box; Problem resolved.

Note: See TracTickets for help on using tickets.