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 DE851602F for ; Thu, 16 Jun 2011 14:51:43 +0000 (UTC) Received: (qmail 38514 invoked by uid 500); 16 Jun 2011 14:51:43 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 38484 invoked by uid 500); 16 Jun 2011 14:51:43 -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 38476 invoked by uid 99); 16 Jun 2011 14:51:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:51:43 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rmannibucau@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-ww0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:51:37 +0000 Received: by wwf26 with SMTP id 26so1226071wwf.20 for ; Thu, 16 Jun 2011 07:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=tfZDDNXrldiSnkhKLLIuFVq670PyVD/DGey6SWDkfAk=; b=qLJLwgyEDSIzX9AL/0huidwjhijmlbvfrTNso47gW/U1KQAyYGkuLFsbXPjb/hICGU KtmbW/8Z36Jl+FAq0CCqFBHLVlCx6iq7tZC3NyUe4aKhQFIHpM752cGfaMyPqUVDPRVS eXNOKWTCyvY1ckxSiXdm2tunFtm4wyKrEKfZA= 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; b=k16wdvJy76nR6GxXOzlemGwkcuaGTB08rDdKCJnFkyIFgcoTy0P28+ewFl97Br5NfB ETV+m3E/WQM6p4HsGVclJBjdhSVinJXoyxN3ENUvp5jhoubRavHSRj22gmOBBpAGbA25 qWZsO3wwTtKiA0up/rSUiNBt2dPRdFiQbyqXo= Received: by 10.227.2.81 with SMTP id 17mr1065153wbi.15.1308235876731; Thu, 16 Jun 2011 07:51:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.32.73 with HTTP; Thu, 16 Jun 2011 07:50:56 -0700 (PDT) In-Reply-To: References: From: Romain Manni-Bucau Date: Thu, 16 Jun 2011 16:50:56 +0200 Message-ID: Subject: Re: Error with camel-ejb To: users@camel.apache.org Content-Type: multipart/alternative; boundary=002215974882b70d1e04a5d56653 X-Virus-Checked: Checked by ClamAV on apache.org --002215974882b70d1e04a5d56653 Content-Type: text/plain; charset=ISO-8859-1 oh you are in an OSGi container? for openejb you have to import package org.apache.openejb.client and org.apache.openejb.client.proxy i think or something like that (i don't really remember). - Romain 2011/6/16 Charles Moulliard > I think that the code that we use to create the endpoint works fine in > a non osgi environment but not on osgi as jndi is not really supported > > @Override > protected Endpoint createEndpoint(String uri, String remaining, > Map parameters) throws Exception { > BeanEndpoint answer = new BeanEndpoint(uri, this); > answer.setBeanName(remaining); > > // plugin registry to lookup in jndi for the EJBs > Registry registry = new JndiRegistry(getContext()); > answer.setBeanHolder(new EjbRegistryBean(registry, > getCamelContext(), answer.getBeanName())); > > Processor processor = answer.getProcessor(); > setProperties(processor, parameters); > return answer; > } > > > On Wed, Jun 15, 2011 at 11:33 PM, Romain Manni-Bucau > wrote: > > Hi, > > > > creating a list with spring should work but i think the problem is the > > context creation here. > > > > personnaly i use the bean component and i ask to me (with java dsl) or > > spring to do the lookup to put it in the camel registry. > > > > - Romain > > > > 2011/6/15 Charles Moulliard > > > >> Hi, > >> > >> I try to use openejb from camel using camel-ejb but get this error > >> when camel looks to find the ejb stateless bean > >> > >> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> xmlns:p="http://www.springframework.org/schema/util" > >> xsi:schemaLocation=" > >> http://www.springframework.org/schema/beans > >> http://www.springframework.org/schema/beans/spring-beans.xsd > >> http://www.springframework.org/schema/util > >> http://www.springframework.org/schema/util/spring-util.xsd > >> http://camel.apache.org/schema/spring > >> http://camel.apache.org/schema/spring/camel-spring.xsd"> > >> > >> > >> > >> > >> > >> 4 > >> 3 > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> >> > key="java.naming.factory.initial">org.apache.openejb.client.RemoteInitialContextFactory > >> ejbd://127.0.0.1:4201 > > >> daniel > >> password > >> > >> > >> > >> > >> 23:12:32,227 | ERROR | foo | DefaultErrorHandler > >> | ache.camel.processor.CamelLogger 232 | 64 - > >> org.apache.camel.camel-core - 2.7.0 | Failed delivery for exchangeId: > >> ID-biker-chm-local-58833-1308171227583-5-6. Exhausted after delivery > >> attempt: 1 caught: org.apache.camel.NoSuchBeanException: No bean could > >> be found in the registry for: CalculatorImplRemote > >> org.apache.camel.NoSuchBeanException: No bean could be found in the > >> registry for: CalculatorImplRemote > >> at > >> > org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:68)[64:org.apache.camel.camel-core:2.7.0] > >> at > >> > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:84)[64:org.apache.camel.camel-core:2.7.0] > >> at > >> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)[64:org.apache.camel.camel-core:2.7.0] > >> at > >> > org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:74)[64:org.apache.camel.camel-core:2.7.0] > >> at > >> > org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:102)[64:org.apache.camel.camel-core:2.7.0] > >> at > >> > org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:72)[64:org.apache.camel.camel-core:2.7.0] > >> at > >> > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[64:org.apache.camel.camel-core:2.7.0] > >> > >> > >> How can we define using tag the following two parameters to > >> call the method sum of the stateless ejb CalculatorRemote ? > >> > >> public int sum(int add1, int add2); > >> > >> > >> ??? > >> > >> > >> > >> Regards, > >> > >> Charles Moulliard > >> > >> Apache Committer > >> > >> Blog : http://cmoulliard.blogspot.com > >> Twitter : http://twitter.com/cmoulliard > >> Linkedin : http://www.linkedin.com/in/charlesmoulliard > >> Skype: cmoulliard > >> > > > --002215974882b70d1e04a5d56653--