camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: EJB Component
Date Mon, 23 May 2011 20:19:46 GMT
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" <richardkettelerij@gmail.com> a
écrit :
> 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 EJB
> 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
> <rmannibucau@gmail.com>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" <richardkettelerij@gmail.com>
a
>> écrit :
>> > 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.
>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message