You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pdread <pa...@enginsol.com> on 2006/08/31 02:56:00 UTC

app to web demo

New to ActiveMQ, trying to get an Application to subscribe to the same topic
as the Portfolio web demo. That is, I would like an app and the web to both
subscribe to the same queue. I tried the
ActiveMQConnectionFactory("vm://localhost") but according to the ActiveMQ
debug the App tries to start a broker, fails because one has the same port,
then exits. The app is on the same machine as the container...would this
matter? 

I using Eclipse/Tomcat/spring to run the portfolio demo, which works fine.

THanks

Paul
-- 
View this message in context: http://www.nabble.com/app-to-web-demo-tf2193800.html#a6071268
Sent from the ActiveMQ - User forum at Nabble.com.


Re: app to web demo

Posted by Adrian Co <ac...@exist.com>.
Hi,

I did a quick scan of the portfolio demo, and it is using an embedded 
broker via (vm://localhost). This means that only jms clients within the 
same vm can connect to it.

Some possible workarounds:

1. Change the org.apache.activemq.brokerURL parameter in the web.xml to 
a tcp connector (tcp://localhost:61616) and start up a separate  broker 
with a tcp connector. You can now create a separate jms client and 
connect to the same tcp address.

2. Configure an embedded broker with a tcp connector. Change the 
org.apache.activemq.brokerURL to something like:

vm:(broker:(tcp://localhost:6000)?persistent=false)?marshal=false

You should be able to connect to the embedded broker using 
"tcp://localhost:6000". For more details on embedded broker 
configuration using the vm transport refer to:
http://www.activemq.org/site/vm-transport-reference.html
http://www.activemq.org/site/broker-configuration-uri.html

Regards,
Adrian Co


pdread wrote:
> New to ActiveMQ, trying to get an Application to subscribe to the same topic
> as the Portfolio web demo. That is, I would like an app and the web to both
> subscribe to the same queue. I tried the
> ActiveMQConnectionFactory("vm://localhost") but according to the ActiveMQ
> debug the App tries to start a broker, fails because one has the same port,
> then exits. The app is on the same machine as the container...would this
> matter? 
>
> I using Eclipse/Tomcat/spring to run the portfolio demo, which works fine.
>
> THanks
>
> Paul
>