},\r
members : {\r
// The URI of the MessageListenerServlet\r
- uri : '/org.argeo.slc.webapp/amq', \r
+ uri : '../amqMessage', \r
\r
// Polling. Set to true (default) if waiting poll for messages is needed\r
poll : true,\r
_handlers : new Array(),\r
\r
_messageHandler : function(response) {\r
- var doc = response.getContent();\r
- var NSMap = {slc:"http://argeo.org/projects/slc/schemas"};\r
- var messages = org.argeo.ria.util.Element.selectNodes(doc, "//response", NSMap);\r
+ var doc = response.getContent(); \r
+ var messages = org.argeo.ria.util.Element.selectNodes(doc, "//response");\r
for(var i=0;i<messages.length;i++){\r
var id = messages[i].getAttribute("id");\r
if(id && this._handlers[id]){\r
\r
// Send a JMS message to a destination (eg topic://MY.TOPIC). Message should be xml or encoded\r
// xml content.\r
- sendMessage : function(destination, message) {\r
- this._sendMessage(destination, message, 'send');\r
+ sendMessage : function(destination, message, properties) {\r
+ this._sendMessage(destination, message, 'send', properties);\r
},\r
\r
// Listen on a channel or topic. handler must be a function taking a message arguement\r
this._sendMessage(destination, id, 'unlisten');\r
},\r
\r
- _sendMessage : function(destination, message, type) {\r
+ _sendMessage : function(destination, message, type, properties) {\r
var req = new qx.io.remote.Request(this.uri, "POST", "text/plain");\r
req.setParameter("destination", destination);\r
req.setParameter("message", message);\r
req.setParameter("type", type);\r
+ if(properties){\r
+ for(var key in properties){\r
+ req.setParameter(key, properties[key]);\r
+ }\r
+ }\r
//req.addListener("completed", this.endBatch, this);\r
req.send();\r
},\r