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 8CFAF445D for ; Mon, 23 May 2011 20:20:13 +0000 (UTC) Received: (qmail 51669 invoked by uid 500); 23 May 2011 20:20:13 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 51641 invoked by uid 500); 23 May 2011 20:20:13 -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 51630 invoked by uid 99); 23 May 2011 20:20:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2011 20:20:13 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rmannibucau@gmail.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-wy0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2011 20:20:06 +0000 Received: by wyb42 with SMTP id 42so5355076wyb.32 for ; Mon, 23 May 2011 13:19:46 -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:date :message-id:subject:from:to:content-type; bh=wM4BhQsZbqo0kPhhx2HNogXAZspT7igRsobN9OWMDGQ=; b=JntXGB9OMgEZw5Y8NMI0a0XF62pdB7LKmGDhhl+tSAUwfLEFsjWnjrO3bwbI2jsZMP 6c9NNmYEXa1BUObzEOZN1VfmLOzSkadZf7uT/9RUx0CKmaE67yhv0/4UAiq2erys2ESk cAaNDnkCD1J5MStAWmFv6wXxbIYEPRfaZBep0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=D/Ev3ADWNPMoQH32d77Fpaglf5B7m78T7zo4DapHHmjQ6sFJfKsTJw5xlm1WjuAzgS 6H4v4CNuDFbh6YX1My+IjvcLIBBSYWMiPpADSF6Su7yfVxLT4+NVtQeXkWZTNBjymL8P Ku7SfqLf+LyHiPh/89nAuzhBA2ZS+ul5Cg0Eo= MIME-Version: 1.0 Received: by 10.216.143.88 with SMTP id k66mr2920586wej.15.1306181986169; Mon, 23 May 2011 13:19:46 -0700 (PDT) Received: by 10.216.30.15 with HTTP; Mon, 23 May 2011 13:19:46 -0700 (PDT) Received: by 10.216.30.15 with HTTP; Mon, 23 May 2011 13:19:46 -0700 (PDT) In-Reply-To: References: <1306170895408-4419615.post@n5.nabble.com> <1306180737646-4420063.post@n5.nabble.com> Date: Mon, 23 May 2011 22:19:46 +0200 Message-ID: Subject: Re: EJB Component From: Romain Manni-Bucau To: users@camel.apache.org Content-Type: multipart/alternative; boundary=0016e6dab6ea4c331d04a3f7314e X-Virus-Checked: Checked by ClamAV on apache.org --0016e6dab6ea4c331d04a3f7314e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable If you create a jndi registry from your jee initial context (via constructor) then you create a defaultcamelcontext using this registry then you can use the bean component to call your ejbs. In spring you can use the jee namespace to lookup your ejbs and camel will merge them in its context (defaultcamelcontext in general). Both solutions work perfectly and doesn't use the ejb component. - Romain Le 23 mai 2011 22:14, "Richard Kettelerij" a =E9crit : > Hi Romain, > > "However IMHO ejb component is useless if you add your ejbs in your > camel context", can you elaborate that a bit? The only function of the EJ= B > component is to call a EJB inside a route (e.g. to initiate some business > logic). > > Regards, > Richard > > On Mon, May 23, 2011 at 10:03 PM, Romain Manni-Bucau > wrote: > >> Hi, >> >> This could be an enhancement using interceptors no? >> >> However IMHO ejb component is useless if you add your ejbs in your camel >> context or if you use your jee jndi context as camel context. >> >> - Romain >> >> Le 23 mai 2011 21:59, "Richard Kettelerij" a >> =E9crit : >> > No, the EJB component only allows you to lookup an EJB in JNDI and invoke >> a >> > method on that bean. >> > >> > When you want to start a Camel route from an EJB you need to setup a >> > CamelContext and get a ProducerTemplate >> > (http://camel.apache.org/producertemplate.html) from the context. The >> > ProducerTemplate allows you to send messages to your route. >> > >> > -- >> > View this message in context: >> http://camel.465427.n5.nabble.com/EJB-Component-tp4419615p4420063.html >> > Sent from the Camel - Users mailing list archive at Nabble.com. >> --0016e6dab6ea4c331d04a3f7314e--