Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 88828 invoked from network); 6 May 2010 09:42:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 May 2010 09:42:41 -0000 Received: (qmail 16157 invoked by uid 500); 6 May 2010 09:42:40 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 16048 invoked by uid 500); 6 May 2010 09:42:38 -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 16040 invoked by uid 99); 6 May 2010 09:42:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 09:42:38 +0000 X-ASF-Spam-Status: No, hits=-0.3 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of willem.jiang@gmail.com designates 74.125.83.173 as permitted sender) Received: from [74.125.83.173] (HELO mail-pv0-f173.google.com) (74.125.83.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 09:42:33 +0000 Received: by pvg11 with SMTP id 11so2446198pvg.32 for ; Thu, 06 May 2010 02:42:12 -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=bO7TMsWUMN1cTFK85nt+qpJoozGoJUOdG98pz0OtkWs=; b=uELkfsttZjgL7VysCdLKQtcOZXmw7VZrse9ivX6BTLAHFszLNQkRH6SwNJl8NPtnGB iIFYDEZV/cSs6hZdukwIaLTYvsxkjfweeC3SvaAaONfvDMFGD1RBUYa58Yc+AQJmu7J9 DiaipEIVNqvok4aPXIXt3ZRns3Dd5u+0J95Qg= 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=lSFxxLUgu4ZAJmkqQnXzHBDZsWitc+LFKS4GBBBLGrXv4fx90a+talj8ZWG8cJc5jE 4pM6/G5VJsDmgefqJ2iDOSmdQFN+Wws/0xK9ta7VYEhsIfMXV5MSWOpGYhsRFxABfLtb u6rPI1orQtB976z4LFD1sssHUBS+oVrAiTUhA= Received: by 10.114.214.33 with SMTP id m33mr2922534wag.107.1273138932584; Thu, 06 May 2010 02:42:12 -0700 (PDT) Received: from [192.168.0.158] ([125.33.120.46]) by mx.google.com with ESMTPS id c14sm3592594waa.1.2010.05.06.02.42.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 02:42:11 -0700 (PDT) Message-ID: <4BE28EEC.20105@gmail.com> Date: Thu, 06 May 2010 17:42:04 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: Question using OSGI / Bean / osgi:service References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Charles, Maybe something is wrong with the OSGi service which is consumed within Spring DM. I need to dig your test case for it. Can you try to using the interface name "com.goodyear.emea.gicl.esb.service.Persistence" instead of "sapPersistence" as the camel-bean's name ? As camel-osgi supports to access the OSGi service within Camel context. Willem Charles Moulliard wrote: > Hi, > > I have created a camel Bean which is exposed as a spring DM service > > public interface Persistence { > > public void save(@Body FinishedTireDocument finishedTiredDocument, > Exchange ecxh); > > } > > public class PersistenceImpl implements Persistence { > > private SapDocumentDAO sapDocumentDAO; > > public void save(@Body FinishedTireDocument finishedTiredDocument, > Exchange ecxh) { > > getSapDocumentDAO().save(finishedTiredDocument); > > } > > public SapDocumentDAO getSapDocumentDAO() { > return sapDocumentDAO; > } > > public void setSapDocumentDAO(SapDocumentDAO sapDocumentDAO) { > this.sapDocumentDAO = sapDocumentDAO; > } > > } > > Spring config > > class="com.goodyear.emea.gicl.esb.service.impl.PersistenceImpl"> > > interface="com.goodyear.emea.gicl.esb.persistence.SapDocumentDAO"/> > > > > interface="com.goodyear.emea.gicl.esb.service.Persistence"/> > > The service is called from a camel route like this : > > public void configure() throws Exception { > > /** > * Route persisting objects in DB > */ > from(queueValidatedUri) > .bean("sapPersistence", "save") > .to(queueValidatedUri); > } > > Spring config > > interface="com.goodyear.emea.gicl.esb.service.Persistence"/> > > Unfortunately, I get this error. > > Caused by: org.apache.camel.component.bean.MethodNotFoundException: > Method with name: save not found on bean: sapPersistence > > Is it allowed to exposed a camel bean like that ? > > Kind regards, > > Charles Moulliard > > Senior Enterprise Architect (J2EE, .NET, SOA) > Apache Camel Committer > > ******************************************************************* > - Blog : http://cmoulliard.blogspot.com > - Twitter : http://twitter.com/cmoulliard > - Linkedlin : http://www.linkedin.com/in/charlesmoulliard >