Thanks for the information all.  I have been messing with the example
Jean-Baptiste mentioned.  My one question on this approach is, is it
possible to change the config file and have the bundle auto-restart with
the new configuration info or do I always have to restart the bundle?  If I
have to restart the bundle (which isn't a big deal), will all the objects
in the blueprint file get recreated since objects defined in the blueprint
are singleton in nature.



On Thu, Oct 9, 2014 at 8:15 AM, Jean-Baptiste Onofré <[email protected]>
wrote:

> Hi Mark,
>
> ConfigAdmin is probably the easiest.
>
> For instance, your blueprint can looks like:
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
>
> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0";>
>
>   <cm:property-placeholder persistent-id="my.config"
> update-strategy="reload">
>     <cm:default-properties>
>        <cm:property name="port" value="9999"/>
>     </cm:default-properties>
>   </cm:property-placeholder>
>
>   <camelContext xmlns="http://camel.apache.org/schemas/blueprint";>
>      <route>
>        <from uri="jetty://0.0.0.0:${port}"/>
>        ....
>      </route>
>   </camelContext>
>
> </blueprint>
>
> You can provide a file etc/my.config.cfg containing the port value.
>
> Regards
> JB
>
>
> On 10/08/2014 08:16 PM, Mark Webb wrote:
>
>> I am building a camel blueprint-based bundle to deploy in ServiceMix.
>> This
>> bundle will listen on a port and receive data to be processed by other
>> bundles.  I would like to make the port and the destination (probably a
>> JMS
>> queue) configurable.  What is the best way to go about doing this?
>>
>> The site where the bundle(s) get deployed will not have a development
>> environment so that's out of the question.
>>
>> Thanks,
>> Mark
>>
>>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Reply via email to