It's been a long time so I might not remember correctly.  I don't think I 
figured out how to use config admin here.  I think I figured out a way for 
these substitution properties to be obtained from the geronimo 
config-substitutions.properties.  I remember I added "arithmatic" capabilities 
to some code I found in aries blueprint.

Using config admin would be somewhat better now but I don't know what changing 
the config while the broker is running should do.

thanks
david jencks

On Nov 25, 2010, at 2:58 AM, viola lu wrote:

> Hi, Dev:
> 
>  When  fixing the jira https://issues.apache.org/jira/browse/GERONIMO-5559, i 
> found that activemq-broker-blueprint module defines its configuration 
> properties in OSGI-INF\blueprint\activemq.xml such as portOffset via cm as 
> below:
> <cm:property-placeholder id="property-placeholder" 
> persistent-id="blueprint-activemq-placeholder" placeholder-prefix="${" 
> placeholder-suffix="}" ignore-missing-locations="true">
>         <cm:default-properties>
>             <cm:property name="activemq.brokerName" value="activemq"/>
>             <cm:property name="activemq.data" value="var/activemq"/>
>             <cm:property name="serverHostname" value="localhost"/>
>             <cm:property name="activemq.port" value="61616"/>
>             <cm:property name="portOffset" value="0"/>
>         </cm:default-properties>
>         
> <cm:location>file:$(karaf.base)/etc/blueprint-activemq-placeholder.cfg</cm:location>
>     </cm:property-placeholder>
> 
> those properties are read into ConfigAdmin service. But amq namespace seems 
> can't parse those properties from configAdmin service as below:
> 
> <amq:brokerService brokerName="${activemq.brokerName}" 
> tmpDataDirectory="${activemq.data}/tmp_storage" schedulerSupport="false">
> ..
>   <amq:transportConnectors>
>             <amq:transportConnector name="openwire" 
> uri="tcp://${serverHostname}:${activemq.port + portOffset}"/>
> ..
> I tried to change portOffset property via 
> etc/blueprint-activemq-placeholder.cfg , but activemq broker port is still 
> default 61616.
> Is there something wrong here?  The code lacks of a activemq handler which 
> should read those properties from configAdmin service?
> Can somebody give some hints, thanks in advance!
> -- 
> viola

Reply via email to