activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Configuring JavaScript-based app to connect to remote JMS topic
Date Thu, 08 Oct 2009 12:50:23 GMT
Hi Doug,

OK, let us know your results. Also, you can use web console or jconsole on
your remote broker to check if messages are flowing to it

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, Oct 8, 2009 at 2:45 PM, Knight, Doug <dknight@mitre.org> wrote:

> Hi Dejan,
> I did have the embeddedBroker=false in my web.xml. It seems that the Jetty
> servlet isn't reading the web.xml file? I really don't have any way to prove
> it though. I have a Java app that reads xml from files and pumps it out to a
> topic, which I can feed to the remote ActiveMQ topic successfully. I just
> can't seem to convince the servlet to connect to the remote topic instead of
> the local one. I guess one simple test would be to modify the web.xml, which
> is used by the other demo web apps that are part of the ActiveMQ distro, and
> see it they connect to the remote ActiveMQ. If I get some time today I'll
> check that out.
>
> Doug
>
>
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan
> Bosanac
> Sent: Thursday, October 08, 2009 8:03 AM
> To: users@activemq.apache.org
> Subject: Re: Configuring JavaScript-based app to connect to remote JMS
> topic
>
> Hi Doug,
>
> that should do the trick. You may also set
>
>    <context-param>
>        <param-name>org.apache.activemq.embeddedBroker</param-name>
>        <param-value>false</param-value>
>        <description>Whether we should include an embedded broker or
> not</description>
>    </context-param>
>
>
> Do you have problems with connecting to the remote broker? If so, is there
> anything in your log that point to the cause of the problem?
>
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Wed, Oct 7, 2009 at 5:54 PM, Knight, Doug <dknight@mitre.org> wrote:
>
> > Hi List,
> > Anyone have any ideas on this?
> >
> > Thanks,
> > Doug
> >
> >
> > From: Knight, Doug
> > Sent: Tuesday, October 06, 2009 3:48 PM
> > To: 'users@activemq.apache.org'
> > Subject: Configuring javascript-based app to connect to remote JMS topic
> >
> > Hi all,
> > I have recently created an app in JavaScript that subscribes to and
> > consumes a topic offer by the local ActiveMQ MB, using the Jetty server
> that
> > came with ActiveMQ. What I want to do is modify the configuration to tell
> > the JavaScript app to connect to a remote ActiveMQ MB instead of the
> local
> > one. Both servers are on the same network. I access the web app using
> > something like:
> >
> > http://localhost:8163/ClientPrototype/process.html?select=15
> >
> > I pretty much just copied the jetty definition in the activemq.xml file
> > like so:
> >
> >    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
> >        <connectors>
> >            <nioConnector port="8163"/>
> >        </connectors>
> >
> >        <handlers>
> >            <webAppContext contextPath="/ClientPrototype"
> > resourceBase="${activemq.base}/webapps/ClientPrototype"
> > logUrlOnStart="true"/>
> >        </handlers>
> >    </jetty>
> >
> > I maintain the JavaScript under
> > C:\apache-activemq-5.2.0\webapps\ClientPrototype. The WEB-INF folder
> still
> > exists just as it did in the delivered binary ActiveMQ package. To try to
> > get the servlet to talk to a remote MB, I modified the web.xml as
> follows:
> >
> >    <!-- context config -->
> >    <context-param>
> >        <param-name>org.apache.activemq.brokerURL</param-name>
> >        <param-value>tcp://jetdev1.mitre.org:61616</param-value>
> >        <!-- <param-value>vm://localhost</param-value> -->
> >        <description>The URL of the Message Broker to connect
> > to</description>
> >    </context-param>
> >
> > I didn't change anything else in the web.xml file from the version that
> > came with the distro. What else do I need to change to get the servlet
> > talking to a remote ActiveMQ topic? If there's any additional info needed
> > let me know and I'll provide it.
> >
> > Thanks,
> > Doug
> >
> >
>

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