You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Daniel Gredler <dg...@dhlglobalmail.com> on 2013/07/16 16:22:44 UTC

More dynamic options for properties component locations

Hi guys,

 

I've submitted a patch as a starting point for a discussion around
options for more dynamic properties component location resolution. I'm
pasting the description below. If anyone has time, I'd be grateful for
any reviews, criticism, etc.

 

Thanks!

 

Daniel

 

 

https://issues.apache.org/jira/browse/CAMEL-6552

 

As part of the properties component, Camel provides abstractions that
make it easy for third parties to customize its behavior (e.g.
PropertiesParser, PropertiesResolver). However, the resolution of
properties file locations cannot be customized, and file locations
cannot be dynamically resolved at runtime.

 

Additionally, Camel's Spring integration allows RouteBuilder instances
to dynamically contribute new routes to the Camel context. However, it
is not easy to dynamically contribute new properties file locations
containing configuration for these routes. The result is that while
routes can be contributed dynamically in a decentralized way, route
configuration must be centralized.

 

The attached patch implements one possible solution to this limitation.
It adds a new interface (PropertiesLocation), a default implementation
(DefaultPropertiesLocation), and two new methods on the
PropertiesComponent: setLocation(PropertiesLocation) and
addLocation(PropertiesLocation). It also ensures that any
PropertiesLocation instances available in the registry (or Spring
context) are automatically added to the PropertiesComponent.