camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcuse <krum...@gmail.com>
Subject Re: Bootstrapping camel from MDB
Date Wed, 16 Sep 2009 06:07:09 GMT

Yes it is a real EJB MDB

So I just set up my camel context & ProducerTemplate in the MDB constructor
and then in the onMessage method i do
producerTemplate.sendBody("whatever",theJmsMessage); ?

/Marcus



Claus Ibsen-2 wrote:
> 
> On Tue, Sep 15, 2009 at 2:49 PM, marcuse <krummas@gmail.com> wrote:
>>
>> Hi
>>
>> I have a project which uses MDBs, and I want to try using camel for
>> routing
>> incoming messages to various message handlers, googling showed me
>> http://camel.apache.org/maven/camel-jms/apidocs/org/apache/camel/component/jms/CamelMessageListener.html
>> but this seems removed from camel 2.0.
>>
>> Also looked at the source for CamelMessageListener to reproduce the
>> functionality, but I did not get by the fact that JmsExchange was removed
>>
>> So, my question is, what is the best practise for using camel from an
>> MDB?
>>
> 
> You are using real EJB MDB, if I understand you correctly?
> 
> And then you want in the onMessage(Message msg) method to route the
> message with Camel?
> 
> You can take a look at this example:
> http://camel.apache.org/walk-through-an-example.html
> 
> Where you can setup Camel manually in the MDB and then use it to route
> the message.
> 
> 
> Camel itself can of course also listen to JMS queues, in case you not
> need to use MDB.
> 
> 
>> /Marcus
>> --
>> View this message in context:
>> http://www.nabble.com/Bootstrapping-camel-from-MDB-tp25453382p25453382.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://www.nabble.com/Bootstrapping-camel-from-MDB-tp25453382p25466487.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message