Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 52796 invoked from network); 25 Jan 2010 19:00:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jan 2010 19:00:54 -0000 Received: (qmail 2659 invoked by uid 500); 25 Jan 2010 19:00:53 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 2622 invoked by uid 500); 25 Jan 2010 19:00:53 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 2612 invoked by uid 99); 25 Jan 2010 19:00:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jan 2010 19:00:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.228 as permitted sender) Received: from [209.85.218.228] (HELO mail-bw0-f228.google.com) (209.85.218.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jan 2010 19:00:43 +0000 Received: by bwz28 with SMTP id 28so2258812bwz.36 for ; Mon, 25 Jan 2010 11:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=ZyC9gzSPKXYi8MwHHoZzhZe0t8WAQmM0icCOcPi/LAI=; b=hlX85gkfru1yykTaimcuZG7ftiTk9Vg8ogLd5yk2lEzIPIJ9+upw7U1xPuim8QPEvL juq0oVv2KVknyDqaNC6STYpfj/S+SJGZgSybZ7b7S7l/+q+eMAwKBRFkMob4e3Oi1ayK YH6FseZ7sLnii7eYkYTKOkUXqQO6cOsds0T8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=tGXMemJPIv55o8GOtEkz+mWfM1FI+RqfQWW3HlfrH4E1ZhrxeUptIgIjwQvTElD2oj CUegRm+Yd36bUNXMrQO8Dw4k7uMYKhdnx4Lzsa3zzytgQQN23Am9D9lNrHAWh78ztj8f BwlOPFREzZFKcMrM7OIbP+eSK5yn4WgSen648= MIME-Version: 1.0 Received: by 10.204.156.195 with SMTP id y3mr1162456bkw.46.1264446022298; Mon, 25 Jan 2010 11:00:22 -0800 (PST) In-Reply-To: References: <5380c69c1001250604j2a1557c1n60ad91bba043fc63@mail.gmail.com> <5380c69c1001250919p6f3f098bja2c83745bca745da@mail.gmail.com> From: Claus Ibsen Date: Mon, 25 Jan 2010 20:00:02 +0100 Message-ID: <5380c69c1001251100u2ca7450dvabd64e9e381038aa@mail.gmail.com> Subject: Re: Scanning/Splitting Large input files To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 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 def= ined as >> >> public String splitBody() { >> =A0return "\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? =A0I 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 https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/te= st/resources/org/apache/camel/spring/processor/splitterMethodCallTest.xml > 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 =3D no need for POJO https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/te= st/resources/org/apache/camel/spring/processor/splitterTokenizerTest.xml If that works for you, feel free to help with the wiki docu http://camel.apache.org/contributing.html --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus