activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McKibben <>
Subject Default the ServerUrl in activemq-ra.rar to the embedded broker name
Date Fri, 14 Aug 2009 09:35:48 GMT

I came across a need to change the embedded broker name created by the
resource adapter using spring property substitution in the xbean
configuration file. The problem with changing the embedded broker name to
something configurable via property substitution is that the ServerUrl must
also change from the hardcoded "tcp://localhost:61616" url to something like
"vm://${brokerName}?create=false". Alas, values in ra.xml cannot be changed
via property substitution. So, what I'd like to do is set the ServerUrl to
null (empty) in the ra.xml, and have it be defaulted to
"vm://brokerName?create=false" automagically from the broker name specified
in the xbean configuration file.  For example:

<!-- <config-property-value>tcp://localhost:61616</config-property-value>

... and also specify an xbean configuration file via the BrokerXmlConfig
configuration property.


Then, inside my broker xml I can specify

<broker brokerName="${}"> ...

I've created an Jira issue
( with an applied patch
that implements this behavior if others find this feature useful and would
like to see it included in a future release. Note, this behavior is only
enabled if the default ra.xml is edited to remove the default value for
ServerUrl *and* specify a valid BrokerXmlConfig location.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message