You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "massive.boisson" <ma...@gmail.com> on 2006/06/01 01:14:16 UTC

Re: embedded broker and in VM protocol

Thanks for the answer. A lot.

This is what I did and it works (for the benefit of future users). 
(I guess docs say as much.)

Broker started from code, url set to tcp://localhost:61616, name to
myBroker.
In the same JVM a producer and consumer with connection urls vm://myBroker. 
(it wouldn't work if I specified vm://localhost:61616. i'd get:
java.lang.NoClassDefFoundError: MalformedObjectNameException).

In another JVM producer and consumer with connection urls
tcp://localhost:61616.

It all works as I expect it.

I guess the only other thing that I dont understand is why do I need to set
transport scheme (tcp://) when specifying broker url. But I'd say this is
relatively minor.

Again, thanks a lot.

--MB
--
View this message in context: http://www.nabble.com/embedded+broker+and+in+VM+protocol-t1708110.html#a4653571
Sent from the ActiveMQ - User forum at Nabble.com.


Re: embedded broker and in VM protocol

Posted by James Strachan <ja...@gmail.com>.
On 6/1/06, massive.boisson <ma...@gmail.com> wrote:
>
> Thanks for the answer. A lot.
>
> This is what I did and it works (for the benefit of future users).
> (I guess docs say as much.)
>
> Broker started from code, url set to tcp://localhost:61616, name to
> myBroker.
> In the same JVM a producer and consumer with connection urls vm://myBroker.
> (it wouldn't work if I specified vm://localhost:61616. i'd get:
> java.lang.NoClassDefFoundError: MalformedObjectNameException).

We're probably using the broker name "localhost:61616" and using that
to make an MBean name where : is probably a reserved character.


> In another JVM producer and consumer with connection urls
> tcp://localhost:61616.
>
> It all works as I expect it.
>
> I guess the only other thing that I dont understand is why do I need to set
> transport scheme (tcp://) when specifying broker url. But I'd say this is
> relatively minor.

We support various transport protocols; failover: tcp: vm: peer: so
its up to the client to say how it wants to connect to the brokers &
what host names & ports to use. Though ActiveMQConnectionFactory does
have a sensible default if you just wanna create that POJO and use it

-- 

James
-------
http://radio.weblogs.com/0112098/