camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Scanning/Splitting Large input files
Date Mon, 25 Jan 2010 19:00:02 GMT
On Mon, Jan 25, 2010 at 7:37 PM, Kevin Jackson <> wrote:
> Hi,
>> How do you want to split your file. Can you split it on some sort of
>> token, which is required by the Scanner?
> I need to split on '**'
> I wrote a simple POJO with a splitBody() method that returns a
> List<String> based on this using a Scanner within the method
>> You can use POJO to return a String value which then will be used by
>> the Scanner.
>> For example in that splitBody method in the sample above it could be defined as
>> public String splitBody() {
>>  return "\n";
>> }
> Ah that is much simpler so I can use the underlying Scanner instead of
> instantiating a new one.
> Can you confirm that the spring xml config is correct?  I can only
> find examples of the Java DSL for this - I'll happily provide a patch
> to the docs if the previous spring xml config is correct.

A good idea is to peek in the camel-spring component as there are a
bunch of tests using Spring XML

eg. like this one

> Thanks I'll refactor tomorrow and save myself some LOC,
> Kev

If you only need to split on ** then you can do all in XML only = no
need for POJO

If that works for you, feel free to help with the wiki docu

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message