Martyn,
ServiceMix can definitely write to files with another file name. Look
at the first example under Marshalers on
http://incubator.apache.org/servicemix/servicemix-file.html for an
example on how to do this using XPath. You can also write your own
marshaler and override the getOutputName() method if you need to
something more special...
As far as I know, you cannot append to a file with the same name. The
files being written are very often XML files, so simply appending
wouldn't make much sense there. However, for plain text files, this
might be a useful requirement, so feel free to raise a JIRA on this and
add a patch if you want.
Gert
martyn wrote:
Using servicemix-file I can set the directory (in the SU xbean file) where
the component will write files - the filenames are always of the form
servicemix-XXXX.xml, where XXXX is an uncontrollable sequence (I believe).
Does anyone know if it is possible (without modifying the components) to:
1. Control the filename dynamically e.g. make XXXX what I want it to be and
be different for different occurrences. (I am trying to build a logging
system where a specific filename is related to a specific occurence.)
2. Add to files with the same name. (I want to add to a single log file
when the same ocurrence happens again and again.)
Regards
Martyn