camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <elihusma...@gmail.com>
Subject Re: PropertyPlaceholder with Java DSL in OSGi Blueprint
Date Wed, 24 Aug 2016 02:56:02 GMT
I did just figure out that if I change the blueprint to the following
property-placeholder declaration:

<blueprint .....>
<ext:property-placeholder>
  <ext:location>file:etc/my-config.cfg</ext:location>
</ext:property-placeholder>

<camelContext id="my-context" xmlns="http://camel.apache.
org/schema/blueprint">
   <package>com.a.b.c.d</package>
</camelContext>
</blueprint>

The values get reloaded when I restart the bundle.  My guess is that the
Java DSL route(s) aren't getting reloaded with the information in
ConfigAdmin when its changed and its only loaded at start time.  Maybe
someone smarter than I with Camel can confirm that.



On Tue, Aug 23, 2016 at 10:48 PM, Mark <elihusmails@gmail.com> wrote:

> yes it is.
>
>
> On Tue, Aug 23, 2016 at 10:41 PM, Brad Johnson <
> brad.johnson@mediadriver.com> wrote:
>
>> Is the my-config in the etc directory?  As my-config.cfg?
>>
>> Brad
>>
>> On Tue, Aug 23, 2016 at 9:17 PM, Mark <elihusmails@gmail.com> wrote:
>>
>> > I have a PropertyPlaceholder defined in my Blueprint file and in my
>> > blueprint file I define the package that contains my Java DSL routes.
>> It
>> > looks something like this:
>> >
>> > <blueprint .....>
>> > <cm:property-placeholder persistent-id="my-config"
>> > update-strategy="reload">
>> >   <cm:default-properties>
>> >    <cm:property name="port" value="12345" />
>> >    <cm:property name="remoteHost" value="127.0.0.1" />
>> >    <cm:property name="remotePort" value="8080" />
>> >   </cm:default-properties>
>> > </cm:property-placeholder>
>> >
>> > <camelContext id="my-context" xmlns="
>> > http://camel.apache.org/schema/blueprint">
>> >    <package>com.a.b.c.d</package>
>> > </camelContext>
>> > </blueprint>
>> >
>> > My routes connects to an external system, so I'd like to change the
>> IP/port
>> > when I deploy my system.  The problem is that when I update the
>> > configuration in ServiceMix, it never gets picked up in the Java DSL.
>> Is
>> > there something that I need to do that I'm not doing?
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message