Thanks Gert

I'll have a further look and see if I can get what I want using Xpath.

As far as appending files is concerned - I was probably going to have to do
some processing (somewhere) on the concatenated files to make sense of them. 
Text files may be a good option.

Many thanks for your response
Martyn



Gert Vanthienen wrote:
> 
> 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
>>   
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-use-servicemix-file-write-content-to-specific-files-and-concatenate-some-content-into-one-file-.-tf4103585s12049.html#a11685779
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to