On Tue, Sep 15, 2009 at 2:49 PM, marcuse <[email protected]> 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
