BeanIO with configuration file outside classpath

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

BeanIO with configuration file outside classpath

Bengt Rodehav
I'm looking at using BeanIO for parsing CSV files. I've chosen BeanIO
before Bindy because I would like to use dynamic mappings (in an xml file
in BeanIO) as opposed to static mappings (using annotations in Bindy).
However, when looking at the camel-beanio component it seems like it only
supports loading the mapping file from classpath. This defeats the purpose
with dynamic mapping I was looking for since I want to be able to put the
mapping in an easily editable external file.

Is there a way to put the mapping file outside classpath in camel-beanio?
From what I can see it is possible in BeanIO itself but not made possible
in the camel-beanio component.

Shall I add a feature request in JIRA?

/Bengt
Reply | Threaded
Open this post in threaded view
|

Re: BeanIO with configuration file outside classpath

Willem.Jiang
Administrator
Hi,  

You can specify the mapping file with file protocol like "file:///home/my/mappingfile".
camel-beanio will load that file for your.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On Thursday, December 20, 2012 at 5:46 PM, Bengt Rodehav wrote:

> I'm looking at using BeanIO for parsing CSV files. I've chosen BeanIO
> before Bindy because I would like to use dynamic mappings (in an xml file
> in BeanIO) as opposed to static mappings (using annotations in Bindy).
> However, when looking at the camel-beanio component it seems like it only
> supports loading the mapping file from classpath. This defeats the purpose
> with dynamic mapping I was looking for since I want to be able to put the
> mapping in an easily editable external file.
>  
> Is there a way to put the mapping file outside classpath in camel-beanio?
> From what I can see it is possible in BeanIO itself but not made possible
> in the camel-beanio component.
>  
> Shall I add a feature request in JIRA?
>  
> /Bengt  


Reply | Threaded
Open this post in threaded view
|

Re: BeanIO with configuration file outside classpath

Bengt Rodehav
Thanks Willem!

/Bengt


2012/12/20 Willem jiang <[hidden email]>

> Hi,
>
> You can specify the mapping file with file protocol like
> "file:///home/my/mappingfile".
> camel-beanio will load that file for your.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On Thursday, December 20, 2012 at 5:46 PM, Bengt Rodehav wrote:
>
> > I'm looking at using BeanIO for parsing CSV files. I've chosen BeanIO
> > before Bindy because I would like to use dynamic mappings (in an xml file
> > in BeanIO) as opposed to static mappings (using annotations in Bindy).
> > However, when looking at the camel-beanio component it seems like it only
> > supports loading the mapping file from classpath. This defeats the
> purpose
> > with dynamic mapping I was looking for since I want to be able to put the
> > mapping in an easily editable external file.
> >
> > Is there a way to put the mapping file outside classpath in camel-beanio?
> > From what I can see it is possible in BeanIO itself but not made possible
> > in the camel-beanio component.
> >
> > Shall I add a feature request in JIRA?
> >
> > /Bengt
>
>
>