camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Johnson <brad.john...@mediadriver.com>
Subject Re: PropertyPlaceholder with Java DSL in OSGi Blueprint
Date Wed, 24 Aug 2016 03:25:25 GMT
Check your blueprint cm version in the XML.  The update stragegy didn't
work before version 1.1.

 xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">

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

> 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