activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <>
Subject Re: Chat JavaScript example
Date Wed, 16 Sep 2009 09:53:49 GMT
Hi Doug,

this should not be the question. The message should be either TextMessage or
toString() will be used on any other kind of message. Take a look at for more

Please let us know if it works for you and file any bugs you find in the
process (with a test case if possible).

Dejan Bosanac

Open Source Integration -
ActiveMQ in Action -
Blog -

On Tue, Sep 15, 2009 at 3:41 PM, Knight, Doug <> wrote:

> All,
> I switched from using my sender page to using the console Send To
> capability. What I have discovered is that in all cases of sending from the
> admin page, both the Msgs Sent and Msgs Received counters increment.
> However, the receiver only generates output when I send well formed XML
> through the admin console send page. That leads me to my next two questions;
> 1) is it required that all messages through ActiveMQ be well formed XML? and
> 2) can I always expect the variable passed to the handler function to be a
> JavaScript object (i.e. containing XML)? Pardon me if this is an obvious
> question, I am new at working with message brokers, especially at this
> level.
> Doug
> -----Original Message-----
> From: Knight, Doug
> Sent: Monday, September 14, 2009 2:33 PM
> To:
> Subject: RE: Chat JavaScript example
> OK, I think I've got it. Now, I've got a barebones sender and receiver
> pair, based on the example in the link below. I see the topic get created
> when I refresh the receiver, and it has a single consumer, as expected. When
> I run the sender to send to that topic, I am having issues trying to issue
> output to the web page on the receiver from within the message handler. I
> originally tried the example using the alert box. The only time I managed to
> get an alert to work was when I had an error in the JavaScript contained in
> the handler. Is there anything special I need to do to output from the
> handler? I've tried direct document.writes, alert with simple text, even
> jQuery output (both with and without the .ready function. Any suggestions?
> Doug
> -----Original Message-----
> From: [] On Behalf Of Dejan
> Bosanac
> Sent: Monday, September 14, 2009 12:34 PM
> To:
> Subject: Re: Chat JavaScript example
> Hi Doug,
> ajax client connects to the servlet (called AjaxServlet) that runs inside
> jetty (or any other web container) that server like a proxy to the broker.
> Therefore, you should all jms related stuff inside your web application.
> Take a look at webapps/demo/WEB-INF/web.xml for an example of how to do it.
> Cheers
> --
> Dejan Bosanac
> Open Source Integration -
> ActiveMQ in Action -
> Blog -
> On Mon, Sep 14, 2009 at 5:45 PM, Knight, Doug <> wrote:
> > All,
> > From the JavaScript-based chat example, and various all-similar sources
> for
> > how to configure it (i.e. see
> > for
> > example), I don't understand how the JavaScript client knows what server
> to
> > connect to. There is mentioned some info about adding to the web.xml, but
> is
> > this used by the JavaScript app or the Jetty server on the server side?
> I've
> > tried to "clone" the chat app to model my app after it (accessing a
> remote
> > JMS topic to retrieve XML data, and display on a GIS map), with no
> success.
> > I never get connected to the CHAT.DEMO topic. Any help on configuring
> both
> > the client and server sides for a JavaScript app would be greatly
> > appreciated. Once I get this working, I'd even be willing to share
> detailed
> > info on the configuration I had to setup.
> >
> > Doug
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message