Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 44753 invoked from network); 22 Aug 2010 07:13:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Aug 2010 07:13:22 -0000 Received: (qmail 26318 invoked by uid 500); 22 Aug 2010 07:13:21 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 26067 invoked by uid 500); 22 Aug 2010 07:13:19 -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 26059 invoked by uid 99); 22 Aug 2010 07:13:18 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Aug 2010 07:13:18 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Aug 2010 07:12:54 +0000 Received: by pzk10 with SMTP id 10so1799744pzk.32 for ; Sun, 22 Aug 2010 00:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=9Nof5kjwvcni8lBBr3DjVPMuiGKnD2ltnPbZ2Ll8YI4=; b=MOhO6sRnURcCRtx2rWUowJFqbec6db1oZ53fFGiJnGv530g6sMH7BgdhCWI/JZTswg JRW79QUytRSkI5L73HsYhfHrtcR+D+TUJj8Iuwyg8nRoYIN9Orwar7cAimyjYeCdogLs RJmMDdWDSeuIiAlB6bSdfY/ZM/5++Ai6wP378= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Tjv36aJ9szi5CLGQSyCOBCVEiLZEagCTI+dizDsfpLGtueiRkxweE3d1r9qC4MtGdg O3fGa8x0+O11D42LR+CDvF24MTSRKjZalC51GIwAOWbkfcIeX9w98ItLBUFAAsns8usM SN1c1jJF6TLAPZhmSBiy7+0cfjLrqWppXZdzw= Received: by 10.114.93.10 with SMTP id q10mr4020873wab.130.1282461152041; Sun, 22 Aug 2010 00:12:32 -0700 (PDT) Received: from [192.168.0.158] ([123.116.40.24]) by mx.google.com with ESMTPS id s5sm9347960wak.12.2010.08.22.00.12.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 22 Aug 2010 00:12:30 -0700 (PDT) Message-ID: <4C70CDD4.1010107@gmail.com> Date: Sun, 22 Aug 2010 15:12:20 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: Problem with bean overloaded method invocation in route References: <1282445662192-2643591.post@n5.nabble.com> In-Reply-To: <1282445662192-2643591.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi You can add @Handle annotation to let camel know which method you want it to pick. You can find more detail information from the section4.4.2 of Camel in Action. Willem senthil.arumugam wrote: > Hi, > > I am trying to invoke a method from my route configured with camel-spring to > persist the consumed message to DB. > > my route is like, > > > > > > > The bean class Foo has two methods, which are overloaded. > > e.g. > > public void save(Collection foos) {} > > public void save(Foo foo) {} > > When the consumer starts listening to the message, I am getting > AmbiguousCallException. > > I can change my method name and make it works. But I would like to know if > there were more elegant way to handle this. > > Thanks in advance. > > - SK