camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier.Roger" <>
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

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:
Sent from the Camel - Users mailing list archive at

View raw message