1 Reply Latest reply on Jan 14, 2011 1:26 AM by Claus Ibsen

    Property substitution within the file URL

    Peter Chandler Master

      Can you do property substitution within the file URL? What I am trying to do is make the source and move directories properties?

       

      Example:

            <from uri="file:${in.directory}?move=${archive.directory}/${date:now:yyyyMMdd}/${file:name.noext}.txt&amp;consumer.delay=1000&amp;readLock=rename&amp;readLockTimeout=1000&amp;maxMessagesPerPoll=100"/>
      

       

      Error Results:

      Caused by: java.lang.IllegalArgumentException: Invalid directory: ${in.directory}. Dynamic expressions with ${ } placeholders is not allowed. Use the fileName option to set the dynamic expression.
      

       

      "Use the fileName option to set the dynamic expression." - what does this mean?

       

      I tried make the file component into an endpoint http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html then I had trouble with the $ and $.

       

      Thanks in advance,

       

      Peter.