You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Kumar Ravella <ry...@gmail.com> on 2008/05/23 07:55:44 UTC

ActiveMQ In Jboss - Two Brokers Getting Created when using VM Protocol

Hi All , 

There are two Brokers Getting Created while trying to use both VM and TCP
Protocols.. 

I deployed ActiveMQ inside JBoss. - activemq-ra.rar.

In my Brokre-Config i have made these setting for My Broker. 

Named it as Broker1 . 
Persistence set to false. 
And in transport Connector i have added both 
tcp://localhost:61616
& 
vm://myvmbroker

But only when i try to use these two URL's in my code . It is creating two
brokers . Broker1 and myvmbroker

Is this a normal Behavior .. ? Can't i make both connections running in
single Broker ?


Thanks 
Kumar Ravella

-----
Thanks,
Kumar Ravella
-- 
View this message in context: http://www.nabble.com/ActiveMQ-In-Jboss---Two-Brokers-Getting-Created-when-using-VM-Protocol-tp17419178s2354p17419178.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ In Jboss - Two Brokers Getting Created when using VM Protocol

Posted by Rob Davies <ra...@gmail.com>.
On 23 May 2008, at 06:55, Kumar Ravella wrote:

>
> Hi All ,
>
> There are two Brokers Getting Created while trying to use both VM  
> and TCP
> Protocols..
>
> I deployed ActiveMQ inside JBoss. - activemq-ra.rar.
>
> In my Brokre-Config i have made these setting for My Broker.
>
> Named it as Broker1 .
> Persistence set to false.
> And in transport Connector i have added both
> tcp://localhost:61616
> &
> vm://myvmbroker
>
> But only when i try to use these two URL's in my code . It is  
> creating two
> brokers . Broker1 and myvmbroker
>
> Is this a normal Behavior .. ? Can't i make both connections running  
> in
> single Broker ?
>
>
> Thanks
> Kumar Ravella
>
> -----
> Thanks,
> Kumar Ravella
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-In-Jboss---Two-Brokers-Getting-Created-when-using-VM-Protocol-tp17419178s2354p17419178.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


So you don't need to add the vm:// connector explicitly - but if you  
do make sure its of the form vm://<BrokerName> e.g. vm://Broker1
When you client connects using the urI vm://Broker1 - it will look for  
a Broker called Broker1 in the VM and if there isn't a vm:// transport  
connector for that broker - one will be created for it. However, if  
there isn't a broker of that name - one will be spun up - which is  
what is happening with your configuration - when the broker registers  
the transport connector vm://myvmbroker - its spinning up another  
broker with the broker name myvmbroker


cheers,

Rob

http://open.iona.com/products/enterprise-activemq
http://rajdavies.blogspot.com/





Re: ActiveMQ In Jboss - Two Brokers Getting Created when using VM Protocol

Posted by Kumar Ravella <ry...@gmail.com>.
HI , 

I have removed my VM Uri from the Broker-Config.xml  and My broker name is
broker1 .. 

In my code i am using my URI as vm://broker1 ... same as my broker name in
Broker-Config.xml . 

But still i am getting  this error.. 

Caused by: javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=broker1,Type=Broker alr
ady registered.

---------
Kumar


rajdavies wrote:
> 
> Are you still explicitly registering a vm:// connector on the broker ?  
> - you shouldn't need to
> 
> cheers,
> 
> Rob
> 
> On 23 May 2008, at 07:51, Kumar Ravella wrote:
> 
>>
>> Hi ,,
>>
>> When i searched archives the suggested solution is to use the same  
>> name for
>> VM and Broker name in broker-config.xml ..
>>
>> If i use BrokerName as the logical name as same i get this error...
>>
>> javax.management.InstanceAlreadyExistsException:
>> org.apache.activemq:BrokerName=broker1,Type=Broker alre
>> ady registered.
>>
>> ....
>>
>> Any advice ?
>>
>> Thanks
>> Kumar
>>
>> Kumar Ravella wrote:
>>>
>>> Hi All ,
>>>
>>> There are two Brokers Getting Created while trying to use both VM  
>>> and TCP
>>> Protocols..
>>>
>>> I deployed ActiveMQ inside JBoss. - activemq-ra.rar.
>>>
>>> In my Brokre-Config i have made these setting for My Broker.
>>>
>>> Named it as Broker1 .
>>> Persistence set to false.
>>> And in transport Connector i have added both
>>> tcp://localhost:61616
>>> &
>>> vm://myvmbroker
>>>
>>> But only when i try to use these two URL's in my code . It is  
>>> creating two
>>> brokers . Broker1 and myvmbroker
>>>
>>> Is this a normal Behavior .. ? Can't i make both connections  
>>> running in
>>> single Broker ?
>>>
>>>
>>> Thanks
>>> Kumar Ravella
>>>
>>
>>
>> -----
>> Thanks,
>> Kumar Ravella
>> -- 
>> View this message in context:
>> http://www.nabble.com/ActiveMQ-In-Jboss---Two-Brokers-Getting-Created-when-using-VM-Protocol-tp17419178s2354p17419485.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 
> 
> 


-----
Thanks,
Kumar Ravella
-- 
View this message in context: http://www.nabble.com/ActiveMQ-In-Jboss---Two-Brokers-Getting-Created-when-using-VM-Protocol-tp17419178s2354p17421693.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ In Jboss - Two Brokers Getting Created when using VM Protocol

Posted by Rob Davies <ra...@gmail.com>.
Are you still explicitly registering a vm:// connector on the broker ?  
- you shouldn't need to

cheers,

Rob

On 23 May 2008, at 07:51, Kumar Ravella wrote:

>
> Hi ,,
>
> When i searched archives the suggested solution is to use the same  
> name for
> VM and Broker name in broker-config.xml ..
>
> If i use BrokerName as the logical name as same i get this error...
>
> javax.management.InstanceAlreadyExistsException:
> org.apache.activemq:BrokerName=broker1,Type=Broker alre
> ady registered.
>
> ....
>
> Any advice ?
>
> Thanks
> Kumar
>
> Kumar Ravella wrote:
>>
>> Hi All ,
>>
>> There are two Brokers Getting Created while trying to use both VM  
>> and TCP
>> Protocols..
>>
>> I deployed ActiveMQ inside JBoss. - activemq-ra.rar.
>>
>> In my Brokre-Config i have made these setting for My Broker.
>>
>> Named it as Broker1 .
>> Persistence set to false.
>> And in transport Connector i have added both
>> tcp://localhost:61616
>> &
>> vm://myvmbroker
>>
>> But only when i try to use these two URL's in my code . It is  
>> creating two
>> brokers . Broker1 and myvmbroker
>>
>> Is this a normal Behavior .. ? Can't i make both connections  
>> running in
>> single Broker ?
>>
>>
>> Thanks
>> Kumar Ravella
>>
>
>
> -----
> Thanks,
> Kumar Ravella
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-In-Jboss---Two-Brokers-Getting-Created-when-using-VM-Protocol-tp17419178s2354p17419485.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ In Jboss - Two Brokers Getting Created when using VM Protocol

Posted by Kumar Ravella <ry...@gmail.com>.
Hi ,,

When i searched archives the suggested solution is to use the same name for
VM and Broker name in broker-config.xml .. 

If i use BrokerName as the logical name as same i get this error... 

javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=broker1,Type=Broker alre
ady registered.

....

Any advice ?

Thanks
Kumar 

Kumar Ravella wrote:
> 
> Hi All , 
> 
> There are two Brokers Getting Created while trying to use both VM and TCP
> Protocols.. 
> 
> I deployed ActiveMQ inside JBoss. - activemq-ra.rar.
> 
> In my Brokre-Config i have made these setting for My Broker. 
> 
> Named it as Broker1 . 
> Persistence set to false. 
> And in transport Connector i have added both 
> tcp://localhost:61616
> & 
> vm://myvmbroker
> 
> But only when i try to use these two URL's in my code . It is creating two
> brokers . Broker1 and myvmbroker
> 
> Is this a normal Behavior .. ? Can't i make both connections running in
> single Broker ?
> 
> 
> Thanks 
> Kumar Ravella
> 


-----
Thanks,
Kumar Ravella
-- 
View this message in context: http://www.nabble.com/ActiveMQ-In-Jboss---Two-Brokers-Getting-Created-when-using-VM-Protocol-tp17419178s2354p17419485.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.