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 C8F9F101D1 for ; Sat, 1 Jun 2013 06:09:26 +0000 (UTC) Received: (qmail 2009 invoked by uid 500); 1 Jun 2013 06:09:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 1976 invoked by uid 500); 1 Jun 2013 06:09:26 -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 1957 invoked by uid 99); 1 Jun 2013 06:09:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jun 2013 06:09:25 +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 (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.181 as permitted sender) Received: from [209.85.223.181] (HELO mail-ie0-f181.google.com) (209.85.223.181) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jun 2013 06:09:21 +0000 Received: by mail-ie0-f181.google.com with SMTP id x14so5839002ief.26 for ; Fri, 31 May 2013 23:09:01 -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=MXKsiM+9xMKCOtRzjY0Q0ANV774QyFiZgR25YFzDFTo=; b=XUw+Shf63fI/1iGQC7YH7V3eG2/PA3GlFOOB0o/ptEXsXYitx08Gk5CDqo0ndfcHBb d70xXYGdzdr3g+xhjGkUnn5vqEnQGufVVX6Vzei1Edaz9zNuN//GhpzoSrREEH/3x+wf GPWA42G0A4/tDTAM3q0F9pyV+eivRkyV62SAwIvLe4lgsKTg8tCLVTdtuSaoF7oVrUSE UBJcOnBiuWP2iADpJz7I4FsQfZccGPsJ+x/g3qURrZwSFqJQ3+EWC4QxLj0mRgUi6kTd T6u5UsFzRrtnoe052aIqOjUMHPlPNOjJ0zSXx5Teq7wIZREtYD6L1oVs/A4GxDD9yD1j tjuQ== X-Received: by 10.50.3.70 with SMTP id a6mr3169413iga.6.1370066941518; Fri, 31 May 2013 23:09:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.246.234 with HTTP; Fri, 31 May 2013 23:08:41 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Sat, 1 Jun 2013 08:08:41 +0200 Message-ID: Subject: Re: bean with method parameters in camel To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org You cannot do this. On Thu, May 30, 2013 at 11:48 AM, Tarun Kumar wrote: > If i try .bean(className, methodName('a', 'b')) : it calls method > methodName of class className with method parameters 'a' and 'b'. However, > if i want value of method variables to come from class variables, how can i > do that? > > what i mean is : > class abc extends RouteBuilder { > private string str1 = 'a'; > private string str2 = 'b'; > ..... > ..... > to().bean(className, methodName(str1, str2)).end(); > > i get str1 and str2 classes not found exception. How can i pass str1 and > str2 values as method parameters without actually hardcoding them? -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen