You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark <el...@gmail.com> on 2016/08/24 02:17:59 UTC

PropertyPlaceholder with Java DSL in OSGi Blueprint

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?

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Mark <el...@gmail.com>.
Good advice.  Thanks for your help Brad.


On Thu, Aug 25, 2016 at 8:09 PM, Brad Johnson <br...@mediadriver.com>
wrote:

> Duh. I should have remembered that but it was awhile ago when I ran into
> it.  I now keep all the names exactly the same in my bundles and then
> export them via he features to the final name.  For the final name I
> generally use the group Id and artifactId.
>
> On Thu, Aug 25, 2016 at 7:07 PM, Mark <el...@gmail.com> wrote:
>
> > Found the problem. You can't have a dash "=" in your config file.  Once I
> > removed it, everything worked.
> >
> >
> > On Thu, Aug 25, 2016 at 12:32 PM, Mark <el...@gmail.com> wrote:
> >
> > > Neither.  Maybe that's the problem.
> > >
> > >
> > > On Wed, Aug 24, 2016 at 3:18 PM, Brad Johnson <
> > > brad.johnson@mediadriver.com> wrote:
> > >
> > >> Hmm.  I'll have to give it a shot and see if it works for me in Fuse.
> > Are
> > >> you using PropertyInject for that or just getter/setter?
> > >>
> > >> Brad
> > >>
> > >> On Wed, Aug 24, 2016 at 10:33 AM, Mark <el...@gmail.com> wrote:
> > >>
> > >> > I agree.  Its working, leave it alone.  Maybe someday I'll port the
> > Java
> > >> > DSL to XML.
> > >> >
> > >> > I did check and I'm using version 1.1 of the blueprint CM.
> > >> >
> > >> > Thanks,
> > >> > Mark
> > >> >
> > >> >
> > >> >
> > >> > On Wed, Aug 24, 2016 at 10:11 AM, Brad Johnson <
> > >> > brad.johnson@mediadriver.com
> > >> > > wrote:
> > >> >
> > >> > > If the update strategy is working you shouldn't have to reload the
> > >> bundle
> > >> > > and shouldn't have to specify ext:location.  But if specifying the
> > >> > location
> > >> > > works then what the heck.  But the blueprint-cm version should fix
> > the
> > >> > > problems for you.
> > >> > >
> > >> > > Brad
> > >> > >
> > >> > > On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <
> > >> > > brad.johnson@mediadriver.com
> > >> > > > wrote:
> > >> > >
> > >> > > > 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 <el...@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 <el...@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?
> > >> > > >> >> >
> > >> > > >> >>
> > >> > > >> >
> > >> > > >> >
> > >> > > >>
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Brad Johnson <br...@mediadriver.com>.
Duh. I should have remembered that but it was awhile ago when I ran into
it.  I now keep all the names exactly the same in my bundles and then
export them via he features to the final name.  For the final name I
generally use the group Id and artifactId.

On Thu, Aug 25, 2016 at 7:07 PM, Mark <el...@gmail.com> wrote:

> Found the problem. You can't have a dash "=" in your config file.  Once I
> removed it, everything worked.
>
>
> On Thu, Aug 25, 2016 at 12:32 PM, Mark <el...@gmail.com> wrote:
>
> > Neither.  Maybe that's the problem.
> >
> >
> > On Wed, Aug 24, 2016 at 3:18 PM, Brad Johnson <
> > brad.johnson@mediadriver.com> wrote:
> >
> >> Hmm.  I'll have to give it a shot and see if it works for me in Fuse.
> Are
> >> you using PropertyInject for that or just getter/setter?
> >>
> >> Brad
> >>
> >> On Wed, Aug 24, 2016 at 10:33 AM, Mark <el...@gmail.com> wrote:
> >>
> >> > I agree.  Its working, leave it alone.  Maybe someday I'll port the
> Java
> >> > DSL to XML.
> >> >
> >> > I did check and I'm using version 1.1 of the blueprint CM.
> >> >
> >> > Thanks,
> >> > Mark
> >> >
> >> >
> >> >
> >> > On Wed, Aug 24, 2016 at 10:11 AM, Brad Johnson <
> >> > brad.johnson@mediadriver.com
> >> > > wrote:
> >> >
> >> > > If the update strategy is working you shouldn't have to reload the
> >> bundle
> >> > > and shouldn't have to specify ext:location.  But if specifying the
> >> > location
> >> > > works then what the heck.  But the blueprint-cm version should fix
> the
> >> > > problems for you.
> >> > >
> >> > > Brad
> >> > >
> >> > > On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <
> >> > > brad.johnson@mediadriver.com
> >> > > > wrote:
> >> > >
> >> > > > 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 <el...@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 <el...@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 <el...@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?
> >> > > >> >> >
> >> > > >> >>
> >> > > >> >
> >> > > >> >
> >> > > >>
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Mark <el...@gmail.com>.
Found the problem. You can't have a dash "=" in your config file.  Once I
removed it, everything worked.


On Thu, Aug 25, 2016 at 12:32 PM, Mark <el...@gmail.com> wrote:

> Neither.  Maybe that's the problem.
>
>
> On Wed, Aug 24, 2016 at 3:18 PM, Brad Johnson <
> brad.johnson@mediadriver.com> wrote:
>
>> Hmm.  I'll have to give it a shot and see if it works for me in Fuse.  Are
>> you using PropertyInject for that or just getter/setter?
>>
>> Brad
>>
>> On Wed, Aug 24, 2016 at 10:33 AM, Mark <el...@gmail.com> wrote:
>>
>> > I agree.  Its working, leave it alone.  Maybe someday I'll port the Java
>> > DSL to XML.
>> >
>> > I did check and I'm using version 1.1 of the blueprint CM.
>> >
>> > Thanks,
>> > Mark
>> >
>> >
>> >
>> > On Wed, Aug 24, 2016 at 10:11 AM, Brad Johnson <
>> > brad.johnson@mediadriver.com
>> > > wrote:
>> >
>> > > If the update strategy is working you shouldn't have to reload the
>> bundle
>> > > and shouldn't have to specify ext:location.  But if specifying the
>> > location
>> > > works then what the heck.  But the blueprint-cm version should fix the
>> > > problems for you.
>> > >
>> > > Brad
>> > >
>> > > On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <
>> > > brad.johnson@mediadriver.com
>> > > > wrote:
>> > >
>> > > > 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 <el...@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 <el...@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 <el...@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?
>> > > >> >> >
>> > > >> >>
>> > > >> >
>> > > >> >
>> > > >>
>> > > >
>> > > >
>> > >
>> >
>>
>
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Mark <el...@gmail.com>.
Neither.  Maybe that's the problem.


On Wed, Aug 24, 2016 at 3:18 PM, Brad Johnson <br...@mediadriver.com>
wrote:

> Hmm.  I'll have to give it a shot and see if it works for me in Fuse.  Are
> you using PropertyInject for that or just getter/setter?
>
> Brad
>
> On Wed, Aug 24, 2016 at 10:33 AM, Mark <el...@gmail.com> wrote:
>
> > I agree.  Its working, leave it alone.  Maybe someday I'll port the Java
> > DSL to XML.
> >
> > I did check and I'm using version 1.1 of the blueprint CM.
> >
> > Thanks,
> > Mark
> >
> >
> >
> > On Wed, Aug 24, 2016 at 10:11 AM, Brad Johnson <
> > brad.johnson@mediadriver.com
> > > wrote:
> >
> > > If the update strategy is working you shouldn't have to reload the
> bundle
> > > and shouldn't have to specify ext:location.  But if specifying the
> > location
> > > works then what the heck.  But the blueprint-cm version should fix the
> > > problems for you.
> > >
> > > Brad
> > >
> > > On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <
> > > brad.johnson@mediadriver.com
> > > > wrote:
> > >
> > > > 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 <el...@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 <el...@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 <el...@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?
> > > >> >> >
> > > >> >>
> > > >> >
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Brad Johnson <br...@mediadriver.com>.
Hmm.  I'll have to give it a shot and see if it works for me in Fuse.  Are
you using PropertyInject for that or just getter/setter?

Brad

On Wed, Aug 24, 2016 at 10:33 AM, Mark <el...@gmail.com> wrote:

> I agree.  Its working, leave it alone.  Maybe someday I'll port the Java
> DSL to XML.
>
> I did check and I'm using version 1.1 of the blueprint CM.
>
> Thanks,
> Mark
>
>
>
> On Wed, Aug 24, 2016 at 10:11 AM, Brad Johnson <
> brad.johnson@mediadriver.com
> > wrote:
>
> > If the update strategy is working you shouldn't have to reload the bundle
> > and shouldn't have to specify ext:location.  But if specifying the
> location
> > works then what the heck.  But the blueprint-cm version should fix the
> > problems for you.
> >
> > Brad
> >
> > On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <
> > brad.johnson@mediadriver.com
> > > wrote:
> >
> > > 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 <el...@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 <el...@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 <el...@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?
> > >> >> >
> > >> >>
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Mark <el...@gmail.com>.
I agree.  Its working, leave it alone.  Maybe someday I'll port the Java
DSL to XML.

I did check and I'm using version 1.1 of the blueprint CM.

Thanks,
Mark



On Wed, Aug 24, 2016 at 10:11 AM, Brad Johnson <brad.johnson@mediadriver.com
> wrote:

> If the update strategy is working you shouldn't have to reload the bundle
> and shouldn't have to specify ext:location.  But if specifying the location
> works then what the heck.  But the blueprint-cm version should fix the
> problems for you.
>
> Brad
>
> On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <
> brad.johnson@mediadriver.com
> > wrote:
>
> > 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 <el...@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 <el...@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 <el...@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?
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Brad Johnson <br...@mediadriver.com>.
If the update strategy is working you shouldn't have to reload the bundle
and shouldn't have to specify ext:location.  But if specifying the location
works then what the heck.  But the blueprint-cm version should fix the
problems for you.

Brad

On Tue, Aug 23, 2016 at 10:25 PM, Brad Johnson <brad.johnson@mediadriver.com
> wrote:

> 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 <el...@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 <el...@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 <el...@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?
>> >> >
>> >>
>> >
>> >
>>
>
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Brad Johnson <br...@mediadriver.com>.
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 <el...@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 <el...@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 <el...@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?
> >> >
> >>
> >
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Mark <el...@gmail.com>.
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 <el...@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 <el...@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?
>> >
>>
>
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Mark <el...@gmail.com>.
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 <el...@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?
> >
>

Re: PropertyPlaceholder with Java DSL in OSGi Blueprint

Posted by Brad Johnson <br...@mediadriver.com>.
Is the my-config in the etc directory?  As my-config.cfg?

Brad

On Tue, Aug 23, 2016 at 9:17 PM, Mark <el...@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?
>