Hi,
Actually Camel already has support for what I was looking for. All I did was 
set the body of the message in my bean to a File object...when I pass this 
message down to a file endpoint it knows its a file handle and automatically 
reads from it. I am not sure which endpoints understand file object as message 
body and which dont but I suppose File and FTP atleast do. (by understand mean 
they realize that they are suppose to read from the File object and that the 
message is not just a string object).

thanks

________________________________
From: Willem.Jiang [via Camel] [mailto:ml-node+s465427n5716226...@n5.nabble.com]
Sent: Wednesday, July 18, 2012 10:10 PM
To: Vishal Changrani
Subject: Re: Preventing reading of a large XML file in memory

Hi,

How did you process the old file?
Maybe you need some file cache to avoid loading the whole XML file into
the memory.

On 7/18/12 10:52 PM, vishal1981 wrote:

> Hi,
> Sorry to bug you again...but..
> Now I have my route configuration as File -> MyBean ->Ftp
> Now MyBean converts the input file to a different format. I want to avoid
> doing a exchange.getOut().setBody(<read new file>) since the new file is
> huge. But somehow I want to convey to the FTP producer that FTP over the new
> file and not the one via message.getIn().getBody().
>
> I tried by just setting the message header .setHeader(Exchange.FILE_NAME,
> "new file path") but I think the FTP producer just does the
> getIn().getBody() irrespective of the file name.
>
> Is there a way to do this?
>
> Thanks for your help.
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716204.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
> .
>


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang




________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716226.html
To unsubscribe from Preventing reading of a large XML file in memory, click 
here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5716064&code=dmlzaGFsLmNoYW5ncmFuaUBlcmljc3Nvbi5jb218NTcxNjA2NHwxNTgwMjU0NDcx>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


--
View this message in context: 
http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716249.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to