Hello All,
I have a method that is writing out files to multiple destinations.  Rather
than configure a route for each destination, I would like to use a single
bean and route to do it.  I set up a route like this for example:

  <route>
    <from uri="bean:myBean"/>
    <to uri="file:/rootDirectory"/>
  </route>

Then in 'myBean', I set the FileComponent.HEADER_FILE_NAME to be something
like 'subdirectory1/subdirectory2/myFileName.xml'.  The file is then written
to /rootDirectory/subdirectory1/subdirectory2/myFileName.xml.

This works great and allows me to write to many different subfolders of
'rootDirectory' with a single bean.  Was this the way the Camel File
component was intended to be used or am I just hacking this improperly?

If this is correct, let me know if this would be something worth including
on the wiki:
http://activemq.apache.org/camel/file.html

Thanks,
Yogesh
-- 
View this message in context: 
http://www.nabble.com/FileComponent.HEADER_FILE_NAME-usage-tp20948456s22882p20948456.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to