camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Howto for MessageListenerProcessor
Date Wed, 29 Oct 2008 13:17:19 GMT
2008/10/29 hennejg <>:
> Hi!
> thanks for your quick reply!
> Claus Ibsen wrote:
>> 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
>> ...
> I am using J2EE, i.e. implementing a J2EE MDB. I played around with
> ProducerTemplates but was under the impression that this is probably not the
> most elegant way. If, for example, I configure a route as
> from("direct:foo").to("stream:out"); and feed (forward) a JMS Message the
> MDB received using ProducerTemplate.sendBody("direct:foo", message), the JMS
> headers are lost and there is no automatic conversion of, say, a TextMessage
> into a String etc. as it happens with the jms:-component. I was hoping for
> the MessageListenerProcessor to do something smart with the headers, but if
> forwarding the headers separately is the recommended way to go, I'm fine
> with that.

See the helper class I just created.

The other option is just create a JmsExchange object from the JMS
Message and send that with the ProducerTemplate


Open Source Integration

View raw message