camel-users mailing list archives

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

#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"/>
    </bean>

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

    from("gsoQueue")
            // map the input from GS to our inhouse format
            .processRef("mapper")






Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: hennejg [mailto:j.henne+nabble@levigo.de] 
Sent: 29. oktober 2008 11:37
To: camel-user@activemq.apache.org
Subject: Howto for MessageListenerProcessor


Hi,

in this message
http://www.nabble.com/How-camel-resolve-JNDI-End-point-td13039322s22882.html#a13100603
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?

Thanks!
Joerg
-- 
View this message in context: http://www.nabble.com/Howto-for-MessageListenerProcessor-tp20224390s22882p20224390.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message