You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Jason Dillon <ja...@planet57.com> on 2006/11/01 07:04:41 UTC

Problem with latest 4.1 SNAPSHOT when broker name is set

Folks, there is a problem with the latest 4.1 SNAPSHOT when a broker  
name is set.  It causes 2 brokers to be created... and I think it is  
because of the newly added CommandAgent service which is added to the  
brokers default services when started.  It is using vm://localhost,  
which appears to be creating a new Broker using the name "localhost"  
when the broker it is attached to has a different name.

For example:

<snip>
BrokerService broker = new BrokerService();
broker.setBrokerName("foo");
broker.start();
</snip>

Will end up creating a broker name "foo" and then another named  
"localhost".

Where, this will create one broker, named "localhost":

<snip>
BrokerService broker = new BrokerService();
broker.start();
</snip>

I'm not really sure how vm://* works with respect to broker names...  
so I can not say for sure what the fix is, or why this is happening.   
But I can say for sure that the above snips create 2 and 1 brokers  
respectively.

We noticed this while trying to track down a rouge activemq-data  
directory which kept popping up in Geronimo, which for some reason  
had its broker gbean set to create a broker with the name "possibly- 
unique-broker".  I've fixed this by only setting the broker name if  
it is non-null, and then commenting out the brokerName attributed in  
the plan, but something is definitely broke on your side of the fence  
wrt broker names and vm:// transports.

--jason



Re: Problem with latest 4.1 SNAPSHOT when broker name is set

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Yep.. looks like problem with the CommandAgent.  The
vm://${brokerName} connector will start up  a broker named
${brokerName} if it is not already running.  I just need to adjust the
start up code so that the command agent is set with the right
connection URI.

On 11/1/06, Jason Dillon <ja...@planet57.com> wrote:
> Folks, there is a problem with the latest 4.1 SNAPSHOT when a broker
> name is set.  It causes 2 brokers to be created... and I think it is
> because of the newly added CommandAgent service which is added to the
> brokers default services when started.  It is using vm://localhost,
> which appears to be creating a new Broker using the name "localhost"
> when the broker it is attached to has a different name.
>
> For example:
>
> <snip>
> BrokerService broker = new BrokerService();
> broker.setBrokerName("foo");
> broker.start();
> </snip>
>
> Will end up creating a broker name "foo" and then another named
> "localhost".
>
> Where, this will create one broker, named "localhost":
>
> <snip>
> BrokerService broker = new BrokerService();
> broker.start();
> </snip>
>
> I'm not really sure how vm://* works with respect to broker names...
> so I can not say for sure what the fix is, or why this is happening.
> But I can say for sure that the above snips create 2 and 1 brokers
> respectively.
>
> We noticed this while trying to track down a rouge activemq-data
> directory which kept popping up in Geronimo, which for some reason
> had its broker gbean set to create a broker with the name "possibly-
> unique-broker".  I've fixed this by only setting the broker name if
> it is non-null, and then commenting out the brokerName attributed in
> the plan, but something is definitely broke on your side of the fence
> wrt broker names and vm:// transports.
>
> --jason
>
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com