You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by maheshadepu <ma...@gmail.com> on 2012/11/06 17:40:22 UTC

bean to file

I have the following requirement.

On error of a camel route I want to write list of beans datat to flat file. 
Those beanse werere populated while processing 
(let say it could be result set or entity bean) .


I am looking some thing like if i tell camel the definition of (mapping of
a) bean or result set
and then it should write to flat file automatically using file component?
Is that possible?
Please point me to the examples or documentation.

Thanks,
Mahesh



--
View this message in context: http://camel.465427.n5.nabble.com/bean-to-file-tp5722243.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: bean to file

Posted by bung_ho <bu...@hotmail.com>.
BeanIO has worked pretty well for me. It's easy to take a (List of) pojo(s)
and dump it to a file. You need to set up the mapping in a config file, then
just do a marshal.

http://camel.apache.org/beanio.html


maheshadepu wrote
> I have the following requirement.
> 
> On error of a camel route I want to write list of beans datat to flat
> file. 
> Those beanse werere populated while processing 
> (let say it could be result set or entity bean) .
> 
> 
> I am looking some thing like if i tell camel the definition of (mapping of
> a) bean or result set
> and then it should write to flat file automatically using file component?
> Is that possible?
> Please point me to the examples or documentation.
> 
> Thanks,
> Mahesh





--
View this message in context: http://camel.465427.n5.nabble.com/bean-to-file-tp5722243p5722251.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: bean to file

Posted by James Carman <ja...@carmanconsulting.com>.
bindy?

On Tue, Nov 6, 2012 at 11:40 AM, maheshadepu <ma...@gmail.com> wrote:
>
> I have the following requirement.
>
> On error of a camel route I want to write list of beans datat to flat file.
> Those beanse werere populated while processing
> (let say it could be result set or entity bean) .
>
>
> I am looking some thing like if i tell camel the definition of (mapping of
> a) bean or result set
> and then it should write to flat file automatically using file component?
> Is that possible?
> Please point me to the examples or documentation.
>
> Thanks,
> Mahesh
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/bean-to-file-tp5722243.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: bean to file

Posted by Christian Müller <ch...@gmail.com>.
Use the "onException" definiton to catch the error, transform/marshal you
bean as you need and use the file component to create the file.

Sent from a mobile device
Am 06.11.2012 17:40 schrieb "maheshadepu" <ma...@gmail.com>:

>
> I have the following requirement.
>
> On error of a camel route I want to write list of beans datat to flat file.
> Those beanse werere populated while processing
> (let say it could be result set or entity bean) .
>
>
> I am looking some thing like if i tell camel the definition of (mapping of
> a) bean or result set
> and then it should write to flat file automatically using file component?
> Is that possible?
> Please point me to the examples or documentation.
>
> Thanks,
> Mahesh
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/bean-to-file-tp5722243.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>