activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chago <nab...@visualxs.com>
Subject Re: ActiveMQ performance(activemq +ajax)
Date Wed, 12 Sep 2007 16:16:27 GMT

The amq.js file that ships with ActiveMQ will automagically load for you,
prototype.js, behavior.js and _amq.js. The real work is done in _amq.js
which communicates with the AjaxServlet to create a javascript JMS client.
The _amq.js needs to make some AJAX calls to the server, thus the inclusion
of prototype. (The behaviour.js file was included to support the examples
and should not be part of amq.js.) 

If you try out my patch, I have made amq.js a standalone javascript file
that still contains all the logic that existed previously. However, I don't
try to load prototype.js. I include an adapter class to allow amq.js to make
AJAX calls using the developer's preferred AJAX library. There are adapters
included for prototype and jQuery.

So, if you look at the chat.html sample included in the "patch" you will see
the html and script initialization you need to perform:

<script type="text/javascript" src="j/prototype.js"></script>
<script type="text/javascript" src="j/amq_prototype_adapter.js"></script>
<script type="text/javascript" src="j/amq.js"></script>
<script>
    window.onload = function() {
        org.activemq.Amq.init({ uri: 'amq', logging: true, timeout: 45 });
    };
</script>

Please let me know if you have any further questions. Also, if you have your
code boiled down to abre essentials, I would be happy to try it locally.

-- jim


JigarP wrote:
> 
> as you have mentioned path for js, so how many js i have to use from zip
> file as there are different js. 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-performance%28activemq-%2Bajax%29-tf4426785s2354.html#a12639023
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message