camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Properties Management Question
Date Wed, 19 Aug 2015 14:28:04 GMT
Hi

Yeah you are welcome to dive into the source, to see if we can add
those prefix/suffix to the bridge. I am not aware of a tech reason not
to. Assuming we can append those prefix/suffix in the bridge before
letting spring resolve it.



On Wed, Aug 19, 2015 at 2:18 PM, James L Greene <jlgreene2@aep.com> wrote:
> I¹m not a big Spring user, so I apologize in advance if this question is a
> bit basic.
>
> For managing my application¹s properties, I have a single file which
> contains details for all of my non-production environments/regions.  The
> properties look something like this:
>
> dev.source.uri=...
> dev.destination.uri=...
>
> test.source.uri=bar=Š
> test.destination.uri=...
>
> qa.source.uri=...
> qa.destination.uri=...
>
> Using the org.apache.camel.component.properties.PropertiesComponent class,
> in combination with its propertyPrefix property, I can use a System
> environment property to specify which region to load properties for.  This
> works great.
>
> I also have connection parameters for external sources (i.e. JMS brokers
> and databases) for which I would like to store their properties in the
> same file.  From reading the documentation, it seems that I would have to
> use the org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer in
> lieu of the PropertiesComponent class, so that I can reference the
> properties outside of the camelContext definition.  Unfortunately, the
> BridgePropertyPlaceholderConfigurer class does not appear to have the same
> ability to specify a propertyPrefix setting.
>
> Obviously, I could separate out the configurations into different
> properties files, per environment.  But I was just curious if there some
> technical reason for why this capability doesn¹t exist in the
> BridgePropertyPlaceholderConfigurer class, or is it just an inconsistency
> between the API¹s?
>
> I¹m using Camel 2.15.0.
>
> Regards,
> Jim
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Mime
View raw message