Hey folks,

currently I am trying to configure ActiveMQ in Apache Geronimo. I deploy my own 
custom module on Geronimo. In the deployment descriptor of this module I would 
like to configure an ActiveMQ broker using a broker URI in the resource adapter 
of ActiveMQ. I am especially interested in configuring NetworkConnector using 
the Broker URI. I found the documentation and an example here:

http://activemq.apache.org/broker-uri.html

The corresponding entry in my deployment descriptor looks like this:

<conn:config-property-setting name="ServerUrl">
vm:broker:(tcp://localhost:61616,network:static://(tcp://remoteHost-1:61616,tcp://
 
remoteHost-2:61616))/DefaultActiveMQBroker?broker.create=yes&amp;jms.watchTopicAdvisories=false&amp;jms.copyMessageOnSend=false&amp;jms.persistent=false
</conn:config-property-setting>

However the configuration using the broker URI does not seem to work, by 
stepping through the code, I can see that no NetworkConnectors are added to the 
DefaultActiveMQBroker. Please note, the »DefaultActiveMQBroker« is default 
created by the Geronimo application server and is already running when my 
module is deployed.

When I change the above code to create a new broker and add my NetworkConnector 
to it, everything works as expected. I changed the port number of the transport 
connector and the broker name, therefore a new broker is created when I deploy 
my custom module. For example the following code works:

<conn:config-property-setting name="ServerUrl">
vm:broker:(tcp://localhost:61636,network:static://(tcp://remoteHost-1:61616,tcp://
 
remoteHost-2:61616))/MyCustomActiveMQBroker?broker.create=yes&amp;jms.watchTopicAdvisories=false&amp;jms.copyMessageOnSend=false&amp;jms.persistent=false
</conn:config-property-setting>

I am also able to modify the activemq.xml included in the ActiveMQ resource 
adapter module of Geronimo . This file is used by Geronimo to configure the 
»DefaultActiveMQBroker« on start up. When adding my NetworkConnectors there, 
erveything works correct and my NetworkConnector are added. But I need to use 
the broker URI configuration from above.

It seems, that it is not possible to add NetworkConnector using the broker URI 
on already running brokers. Is this a known bug?
Am I missing something?

Any suggestion is greatly appreciated.

Cheers,
Ömer

Reply via email to