camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Anderson <pbander...@gmualumni.org>
Subject Path in file component using property value
Date Mon, 18 Feb 2013 15:42:25 GMT
I have a camel-context.xml file with a route that polls a directory.  I have
a property file that is being read and I would like to use a property from
it to set the directory.  First I tried this:

<from
uri="file://${PreOutDir}?delete=true&amp;include=..*\.info&amp;maxMessagesPerPoll=1&amp;sortBy=file:name"/>

where PreOutDir is my property name but I got a message saying

Dynamic expressions with ${ } placeholders is not allowed. Use the fileName
option to set the dynamic expression.

I tried this

<from
uri="file://?fileName=${PreOutDir}&amp;delete=true&amp;maxMessagesPerPoll=1&amp;include=..*\.info&amp;sortBy=file:name"/>

but that produced
Unknown function: PreOutDir at location 0
${PreOutDir}
*

This must be possible but the syntax is not clear...

I'm using Camel 2.10.1

Does anyone know a way?

Thanks!




--
View this message in context: http://camel.465427.n5.nabble.com/Path-in-file-component-using-property-value-tp5727738.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message