camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Dynamic origin file components?
Date Sat, 29 May 2010 07:15:26 GMT
On Fri, May 28, 2010 at 6:30 PM, Mattias Severson <matsev@gmail.com> wrote:
>
> That seems like a neat solution. :-)
>
> Question:
> Is it possible to send several files to one receiver in a similar way (e.g.
> by providing a Collection<File> as body)? Naturally, I can iterate over the
> file collection and send the files one by one, but I guess that the
> performance would be better if all files can be sent during the same FTP
> session.
>

It should reuse the same ftp client and check whether its already
connected so just iterate and send the files one by one.
You can however force the ftp client to disconnect after each use, but
you have to turn that on with disconnect=true.

So out of the box it should work fine for you.


>
> Claus Ibsen-2 wrote:
>>
>> ProducerTemplate template = ...
>> File target = new File("the file name here");
>>
>> template.sendBodyAndHeader(ftpEndpointHere, target,
>> Exchange.FILE_NAME, "the file name to be written on the ftp server");
>>
>
> --
> View this message in context: http://old.nabble.com/Dynamic-origin-file-components--tp28705368p28709030.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message