camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: Howto for MessageListenerProcessor
Date Wed, 29 Oct 2008 10:49:27 GMT

#1: Are you using J2EE message driven beans (EJB beans)?
#2: Or do you want to using Spring-based message listener (what Camel uses)?

If #1 then you can send the data from your J2EE MDB to Camel using a ProducerTemplate

If #2 then check out some of the spring-jms examples that is in the camel distro.

Here is a snippet from one of my proof of concept with Camel in WebSphere (#2)

    <!-- websphere JMS connection factory -->
    <jee:jndi-lookup id="wasJMSConnectionFactory" jndi-name="jms/connectionFactory"/>

    <!-- jms provider -->
    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
        <property name="connectionFactory" ref="wasJMSConnectionFactory"/>

The above is standard Spring stuff doing jndi lookup in WebSphere and a JMS component in Camel
that uses the WebSphere connection factory.

Then the rest is standard Camel where you can route with from("jms:MyQueueName").to("bean:doSomething");

For instance I have defined this endpoint id in camel context (XML)
        <endpoint id="gsoQueue" uri="jms:queue:gsopenInbox"/>

And then the routing in Java DSL using the endpoint id as a reference

            // map the input from GS to our inhouse format

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: hennejg [] 
Sent: 29. oktober 2008 11:37
Subject: Howto for MessageListenerProcessor


in this message
the MessageListenerProcessor is mentioned as a possible way to feed messages
received by an MDB into camel. However, I found it rather non-obvious how
this is actually accomplished. Is there a brief howto or example of what to
provide to the MLP constructor based on a given camel context?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message