You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Olivier.Roger" <ol...@bsb.com> on 2010/11/08 10:01:22 UTC
Re: Properties in Java DSL
Thanks Claus,
I got this working using
getContext().resolvePropertyPlaceholders("{{key}}"));
However, I could not retrieve the Propeties Object from the context.
When I use this :
Map<String, String> properties = getContext().getProperties();
System.out.println("size=" + properties.keySet().size());
The output is always "size=0".
Is there a reason for this ?
--
View this message in context: http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3254659.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Properties in Java DSL
Posted by "Olivier.Roger" <ol...@bsb.com>.
I see,
It explains the results I observed then.
Thanks for the explanation.
--
View this message in context: http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3254753.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Properties in Java DSL
Posted by German O <ge...@gmail.com>.
Ok, and how can I access to a property value, from java code?
--
View this message in context: http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p5723683.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Properties in Java DSL
Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 8, 2010 at 10:01 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> Thanks Claus,
>
> I got this working using
> getContext().resolvePropertyPlaceholders("{{key}}"));
>
> However, I could not retrieve the Propeties Object from the context.
> When I use this :
>
> Map<String, String> properties = getContext().getProperties();
> System.out.println("size=" + properties.keySet().size());
>
> The output is always "size=0".
>
> Is there a reason for this ?
Yes those 2 features are not related.
The properties placeholders is a Camel component
See the documentation
http://camel.apache.org/properties
Property placeholders is also discussed in the camel book chapter 6
The properties on CamelContext is currently kinda like for system
properties where you can set a few options to control some logging and
charset etc.
> --
> View this message in context: http://camel.465427.n5.nabble.com/Properties-in-Java-DSL-tp3242156p3254659.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/