Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DC2910750 for ; Sat, 12 Oct 2013 07:06:16 +0000 (UTC) Received: (qmail 43285 invoked by uid 500); 12 Oct 2013 07:06:15 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 42906 invoked by uid 500); 12 Oct 2013 07:06:11 -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 42898 invoked by uid 99); 12 Oct 2013 07:06:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Oct 2013 07:06:09 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.173 as permitted sender) Received: from [209.85.223.173] (HELO mail-ie0-f173.google.com) (209.85.223.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Oct 2013 07:06:04 +0000 Received: by mail-ie0-f173.google.com with SMTP id u16so2523654iet.32 for ; Sat, 12 Oct 2013 00:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=2ybfllUFiuSvpesrr/KpqLgUoO/62j9ZPj38S1rdS+A=; b=rB+2yyFZdT3BTcqFHRu3sNyWpHGhiOhiDhHOSeztgQp2Aee2bBJVYbYuSK5lUcy/yw Db9MQSdVXb8fxPoR69MTBED4T77hM9rBKNInuy+LridiayIiQpeGef42jTa6tHIYSsBT zUvNImyCmDz5K5F2DuAXtefGvtRFWhoQqg8ba4qiclURth1uMqo/RfXEJR21nPTX4WQJ z1KwdXkfpbLXn5Th69xC5RRShr3pRGAwaHRaeXsl4ENxyUYktHB/c8+4Ok8hNy3vkz4M aBP6Mq9zdvqgAUwv2DUqEclTS3mh3UYGfo575QqCiHJ1xjW/6S95x+IZrKifcp626Qwy aSpg== X-Received: by 10.42.40.83 with SMTP id k19mr13588943ice.3.1381561543192; Sat, 12 Oct 2013 00:05:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.168.38 with HTTP; Sat, 12 Oct 2013 00:05:23 -0700 (PDT) In-Reply-To: <52585873.6090905@gmail.com> References: <52585873.6090905@gmail.com> From: Claus Ibsen Date: Sat, 12 Oct 2013 09:05:23 +0200 Message-ID: Subject: Re: Java DSL: do I have to have a child for a split()? To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Yes a child output is expected. Maybe instead of using splitter use message translator, and return what your want asap, instead of splitting. On Fri, Oct 11, 2013 at 9:58 PM, Keith Freeman <8forty@gmail.com> wrote: > My route is built in parts from different spots in my code, and at one point > I do a split: > > choice().when(...).bean(...).split().method(splitBean, > "splitMethod").endChoice().otherwise().bean(...); > > This results in a "IllegalArgumentException: Definition has no children on > Split...". > > But at this point in the code I don't know what's going to be added to the > route, I just want the results of the split() to be forwarded down the > route. I currently accomplish this by sticking a no-op processor into the > route: > > ...split().method(...).process(new Processor() { public void > process(Exchange e) { /* no-op */ }}).endChoice()... > > Which works fine, but do I really have to do this (it seems kind of ugly and > inefficient)? Is there something better as a Camel coding idiom that's > maybe more efficient? -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen