activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From habumaster <phil.din...@ericsson.com>
Subject Re: Question about ajax.html examples on website
Date Sat, 22 Jan 2011 15:23:15 GMT


Alex Dean-2 wrote:
> 
> 
> On Jan 21, 2011, at 11:13 PM, habumaster wrote:
> 
> 
> Replies inline. It seems I am getting to 8161 and it is returning the
> welcome page for ActiveMQ?
> I thought through the NIO connector/selector I would be accessing the Ajax
> servelets?  
> 
>>1. Is your Ruby app Rails or something else?  Running via passenger,
mongrel, or other?
> 
> Rails via Passenger 
> 
>>2. What URL do you visit to view your test web page?
> 
> I have run my own test send/receive web pages in the demo directory. They
> work fine without having to redirect via a proxy, since I am local on the
> server. 
> 
> What I progressed to - I login to my existing rails app I had running
> using FireFox indcating the workbench I want. The rails app serves up that
> workbench. Onload of the workbench, I have amq.init starting. I am
> expecting amq client to be available. 
> 
> Login:
> URL http://server:8080
> 
> Workbench:             
> URL http://server:8080/workbenches/ID
> 
> 
>>3. Post the <script> tags you have in that page, and the JS code you're
using to configure amq.js.
> 
> Application.js 
> function startOV_amq(myChannel) {
> 
> 	var amq = org.activemq.Amq;
>     
>     var MyHandler = {
> 		rcvMessage: function(message)
> 		{ eval(message.data) }
> 		};	
> 		
> 	amq.init({ uri: "/amq",
> 	logging: true,
> 	timeout: 45,
> 	clientId: (new Date()).getTime().toString()});
> 	
> 	amq.addListener('MyHandler', myChannel, MyHandler.rcvMessage);
> 	}
> 
> 
> <%= javascript_include_tag :defaults, 'ov', 'amq_prototype_adapter', 'amq'
> %>
> 
> <%= javascript_tag "Event.observe(window, 'load', function ()
> {startOV_amq('CHANNEL_#{@workbench.id}')})" %>
> 
> <script src="/javascripts/prototype.js?1280327078"
> type="text/javascript"></script> 
> 10<script src="/javascripts/effects.js?1280327078"
> type="text/javascript"></script> 
> 11<script src="/javascripts/dragdrop.js?1280327078"
> type="text/javascript"></script> 
> 12<script src="/javascripts/controls.js?1280327078"
> type="text/javascript"></script> 
> 13<script src="/javascripts/oneview.js?1292534305"
> type="text/javascript"></script> 
> 14<script src="/javascripts/amq_prototype_adapter.js?1290766826"
> type="text/javascript"></script> 
> 15<script src="/javascripts/amq.js?1290766826"
> type="text/javascript"></script> 
> 16<script src="/javascripts/application.js?1295653682"
> type="text/javascript"></script> 
> 
>>4. Post the proxy configuration you've got in Apache.
> 
> ProxyRequests Off
>       ProxyPass /amq http://localhost:8161 retry=10     
>       ProxyPassReverse /amq http://localhost:8161           
>       ProxyPassReverseCookiePath / /amq
> 
>>5. Post a few examples of the Apache errors you see.
> 
> [Fri Jan 21 21:39:17 2011] [debug] mod_proxy_http.c(56): proxy: HTTP:
> canonicalising URL //localhost:8161
> [Fri Jan 21 21:39:17 2011] [debug] proxy_util.c(1488): [client
> 47.102.211.208] proxy: http: found worker http://localhost:8161 for
> http://localhost:8161/?timeout=45000&d=1295668347118&r=0.3465096321093155&clientId=1295668340376,
> referer: http://47.105.91.75:8080/workbenches/12
> [Fri Jan 21 21:39:17 2011] [debug] mod_proxy.c(966): Running scheme http
> handler (attempt 0)
> [Fri Jan 21 21:39:17 2011] [debug] mod_proxy_http.c(1976): proxy: HTTP:
> serving URL
> http://localhost:8161/?timeout=45000&d=1295668347118&r=0.3465096321093155&clientId=1295668340376
> [Fri Jan 21 21:39:17 2011] [debug] proxy_util.c(2044): proxy: HTTP: has
> acquired connection for (localhost)
> [Fri Jan 21 21:39:17 2011] [debug] proxy_util.c(2102): proxy: connecting
> http://localhost:8161/?timeout=45000&d=1295668347118&r=0.3465096321093155&clientId=1295668340376
> to localhost:8161
> [Fri Jan 21 21:39:17 2011] [debug] proxy_util.c(2195): proxy: connected
> /?timeout=45000&d=1295668347118&r=0.3465096321093155&clientId=1295668340376
> to localhost:8161
> [Fri Jan 21 21:39:17 2011] [debug] mod_proxy_http.c(1753): proxy: start
> body send
> [Fri Jan 21 21:39:17 2011] [debug] mod_proxy_http.c(1842): proxy: end body
> send
> [Fri Jan 21 21:39:17 2011] [debug] proxy_util.c(2062): proxy: HTTP: has
> released connection for (localhost)
> [Fri Jan 21 21:39:17 2011] [debug] mod_proxy_http.c(56): proxy: HTTP:
> canonicalising URL //localhost:8161
> 
>>6. Post a few examples of whatever is filling the Firebug log.  It would
be great to see a GET for polling, >and the response which comes back from
ActiveMQ.
> 
> This was the most I could get since it spools by so fast :(
> 
> 47.102.211.208 - - [22/Jan/2011:08:24:26 -0600] "GET
> /amq?timeout=45000&d=1295707035229&r=0.6207296420130076&clientId=1295706770151
> HTTP/1.1" 200 6618 "http://47.105.91.75:8080/workbenches/12" "Mozilla/5.0
> (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203
> Firefox/3.6.13
> 
> And the incoming result 
> 
> Error occurred in poll. HTTP result: undefined, status: TypeError:
> data.getElementsByTagName is not a function
> Exception in the poll handler: <!-- Licensed to the Apache Software
> Foundation (ASF) under one or more contributor license agreements. See the
> NOTICE file distributed with this work for additional information
> regarding copyright ownership. The ASF licenses this file to You under the
> Apache License, Version 2.0 (the "License"); you may not use this file
> except in compliance with the License. You may obtain a copy of the
> License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
> applicable law or agreed to in writing, software distributed under the
> License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
> CONDITIONS OF ANY KIND, either express or implied. See the License for the
> specific language governing permissions and limitations under the License.
> --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html
> PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta
> http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>Apache ActiveMQ</title> <style type="text/css" media="screen">
> @import url(/admin/styles/sorttable.css); @import
> url(/admin/styles/type-settings.css); @import url(/admin/styles/site.css);
> @import url(/admin/styles/prettify.css); </style> <script
> type='text/javascript' src='/js/common.js'></script> <script
> type='text/javascript' src='/js/css.js'></script> <script
> type='text/javascript' src='/js/standardista-table-sorting.js'></script>
> <script type='text/javascript' src='/js/prettify.js'></script>
> <script>addEvent(window, 'load', prettyPrint)</script> </head> <body>
<div
> class="white_box"> <div class="header"> <div class="header_l"> <div
> class="header_r"> </div> </div> </div> <div class="content">
<div
> class="content_l"> <div class="content_r"> <div> <!-- Banner -->
<div
> id="asf_logo"> <div id="activemq_logo">  http://activemq.apache.org/
> ActiveMQ   http://www.apache.org/ ASF  </div> </div> <div
> class="top_red_bar"> <div id="site-breadcrumbs"> 
> 
> 
>>Hopefully something in there will help point out what the problem is.
> 
> alex
> 

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Question-about-ajax-html-examples-on-website-tp3216811p3231484.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message