camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier.Roger" <olivier.ro...@bsb.com>
Subject Re: Properties in Java DSL
Date Fri, 29 Oct 2010 15:31:41 GMT

I found 2 ways to do it, I do not know which one is best.

First I configure a propertiesPlaceholder in the CamelContext
    <osgix:cm-properties id="properties" persistent-id="myRoute" />

In both case I use the CamelContext using the getContext() method.
After that I can either retrieve the the Property as a Map :
    Map<String, String> properties = getContext().getProperties();

... Or use it to resolve the properties directly
    getContext().resolvePropertyPlaceholders(null)

I feel more confortable to retrieve the object and use it but I was
wondering is there was any drawback/better alternative to that method ?
-- 
View this message in context: http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3242204.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message