You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ryan Moquin <fr...@gmail.com> on 2016/03/18 14:25:25 UTC

Restarting CamelContext and re-resolving endpoint URIs

Hi,

I normally use OSGi with Camel therefore I am able to take advantage of the
fact that when a property that is used in an endpoint url, is changed in
it's configuration file, the camel context reloads and the endpoint uri is
rebuilt with the updated property value.

I'm working on a project that currently isn't using OSGi, is there a way to
mimic the same thing without it?  I am able to detect property file
changes, and then invoke a stop and start on a CamelContext, but it still
hangs onto the old endpoint uri.  Is there a way to cause the
PropertiesComponent to reload the properties and the endpoint uris to get
re-resolved?  I saw there is a cache flag on the PropertiesComponent, I
didn't see any documentation on exactly what that does.

Thanks for any help!

Ryan

Re: Restarting CamelContext and re-resolving endpoint URIs

Posted by Ryan Moquin <fr...@gmail.com>.
Never mind, I just noticed that stopping and restarting is reloading the
properties, I must have accidentally changed the wrong property which is
why it didn't work,  My bad. :)


On Fri, Mar 18, 2016 at 9:25 AM Ryan Moquin <fr...@gmail.com> wrote:

> Hi,
>
> I normally use OSGi with Camel therefore I am able to take advantage of
> the fact that when a property that is used in an endpoint url, is changed
> in it's configuration file, the camel context reloads and the endpoint uri
> is rebuilt with the updated property value.
>
> I'm working on a project that currently isn't using OSGi, is there a way
> to mimic the same thing without it?  I am able to detect property file
> changes, and then invoke a stop and start on a CamelContext, but it still
> hangs onto the old endpoint uri.  Is there a way to cause the
> PropertiesComponent to reload the properties and the endpoint uris to get
> re-resolved?  I saw there is a cache flag on the PropertiesComponent, I
> didn't see any documentation on exactly what that does.
>
> Thanks for any help!
>
> Ryan
>