Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 15208 invoked from network); 3 Mar 2008 09:34:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 09:34:57 -0000 Received: (qmail 9447 invoked by uid 500); 3 Mar 2008 09:34:48 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 9427 invoked by uid 500); 3 Mar 2008 09:34:48 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 9411 invoked by uid 99); 3 Mar 2008 09:34:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 01:34:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of toxicafunk@gmail.com designates 64.233.184.237 as permitted sender) Received: from [64.233.184.237] (HELO wr-out-0506.google.com) (64.233.184.237) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 09:34:12 +0000 Received: by wr-out-0506.google.com with SMTP id 69so252260wra.16 for ; Mon, 03 Mar 2008 01:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=qtEZG7PJ9wHykYHlsISKtuV4QYKdHwKc9aQDP35yP3g=; b=l4qe4C0OuUVND5S12nWhQqHtQvunpbGD5mjSYjBw5+BPRLYzRbvzekorDai5viNoDflUAaHxF/gO46ri2mD9qSusATL4mugPMWWbN47NP1rSpqIgU3XMlCvz4xEZ+9RVDCd0yD50KZnEr+d7VtJR3wAZ+N5tbAXwXcDxH24PFEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=pYVWalVC6LtBJeF6nFYvicdhbML9xGtu/c5fnTZJ4OJWRyANsIcQ/XDRO07z8nVhb0fshMcMH5zTolncdk5+p/y4hkYRVOLjpBB0Km1e/a+pF42VIaItKvjafnQJXzs97ODuLIebPz0ieD1TxHYKeZoOu+QrpVSxPIeUKxkmmZA= Received: by 10.65.242.11 with SMTP id u11mr24755396qbr.67.1204536850071; Mon, 03 Mar 2008 01:34:10 -0800 (PST) Received: from ?10.103.10.128? ( [62.22.47.130]) by mx.google.com with ESMTPS id q16sm4211812qbq.0.2008.03.03.01.34.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 Mar 2008 01:34:09 -0800 (PST) Message-ID: <47CBC613.6050004@gmail.com> Date: Mon, 03 Mar 2008 10:34:11 +0100 From: Eric Rodriguez User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: users@activemq.apache.org Subject: Re: AjaxServlet questions References: <178a47eb0802291008v15ca8ab0p3dbeb0fd28cb4103@mail.gmail.com> In-Reply-To: <178a47eb0802291008v15ca8ab0p3dbeb0fd28cb4103@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 1. On the web.xml of your AjaxServlet make sure you have: org.apache.activemq.brokerURL tcp://url.to.amqBroker:61616 The URL of the Message Broker to connect to Now your servlet knows where the broker is. 2. On your HTML/JSP/Javascript subscribe to the topic/queue where your JMS app is publishing messages: var myHandler = { rcvDiff: function(message) { doSomething(); } }; function listenersInit() { amq.addListener("anyID","topic://my_topic",myHandler.rcvDiff); } 3. You're ready to go. You don't need to embed AMQ (but you could if you want). if you want to send message or create a new topic/queue just do: amq.sendMessage("my_queue",msg); Regards, Eric Brent Baxter wrote: > > So, my questions are: > > 1. How do I configure the AjaxServlet to find my AMQ and related topics? > 2. Or, is this just "auto-magically" done for me? > 3. Or, do I need to be running AMQ embedded in the same servlet container as > my web application in order for this to work? > 4. Or, and is is my worst fear, is none of this possible since the AMQ > AjaxServlet simply creates topics / queues on the fly for your web app and > does not integrate at all with the full AMQ broker? > > Thanks in advance. > Brent > >