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: Preventing reading of a large XML file in memory
Date Tue, 17 Jul 2012 04:41:47 GMT
On Tue, Jul 17, 2012 at 6:18 AM, vishal1981
<vishal.changrani@ericsson.com> wrote:
> Thanks.  I read about the working directory and thats exactly what I was looking for.
thank you.
> Yet to try it though.
> However, what if I want the same behaviour for File. i.e. File ->Bean (no FTP). I
dont want the file component to read the whole file just pass along the file path to the bean?
> Is there something similiar for File component?
>

Yes as the file component only stores the handle to the file. And only
read it on demand.
So in your bean, just pass in java.io.File, or a FileInputStream,
InputStream etc.

>
> ________________________________
> From: Claus Ibsen-2 [via Camel] [mailto:ml-node+s465427n5716115h91@n5.nabble.com]
> Sent: Monday, July 16, 2012 2:54 PM
> To: Vishal Changrani
> Subject: Re: Preventing reading of a large XML file in memory
>
> Sorry it was the ftp endpoint i meant
>
> On Monday, July 16, 2012, vishal1981 wrote:
>
>> Thanks for the reply.
>> So is it compulsory to use a JMS Endpoint to prevent Camel from reading the
>> whole message in memory?
>> What is to my bean I dont pass the message body as a parameter but just
>> then
>> filename? Will that prevent Camel from loading the whole message in memory
>> before calling my bean method?
>> i.e. from(ftp.....).to(bean(MyBean.class,
>> "doSomething(${header.CamelFileName})")
>> (am using Camel 2.9)
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Preventing-reading-of-a-large-XML-file-in-memory-tp5716064p5716083.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [hidden email]</user/SendEmail.jtp?type=node&node=5716115&i=0>
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ________________________________
> 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-tp5716064p5716115.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-tp5716064p5716139.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message