Re: using MessageConverter with Bean

2012-04-19 Thread Xuan Huang
Hi Raul, Thanks for the great help! We did make it work with the approach mentioned in my previous post. But I'll bear it in mind what you said. xuan On 17 Apr 2012, at 17:53, Raul Kripalani wrote: Hi Xuan, Sorry for the extremely late response. I hope you found your way, but in case you did

Re: using MessageConverter with Bean

2012-04-17 Thread Raul Kripalani
Hi Xuan, Sorry for the extremely late response. I hope you found your way, but in case you didn't, what's probably happening is that you are losing your initial message headers (amongst which is JMSReplyTo). In your beans which manipulate the message, you may be populating the OUT message and for

Re: using MessageConverter with Bean

2012-03-23 Thread Xuan Huang
Hi Raul, I think you are right. So we ended up doing: .to("bean:messageListener?method=handleMessage") .to("bean:jsonMessageConverter?method=convertToMessage") And basically the convertToMessage method just sets the 'JMSType' on the exchange. What we found out though is that it seems when we

Re: using MessageConverter with Bean

2012-03-23 Thread Raul Kripalani
I don't think you need a message converter for that. Why don't you try setting the JMSType header after the inOut invocation to the bean? For example: @Override public void configure(){ from(IN_QUEUE).choice() .when(header("JMSType").isEqualTo("CommandType")) .inOut("bean:

using MessageConverter with Bean

2012-03-22 Thread Xuan Huang
Hi, I have in my RouteBuilder something like this: public class MyRouteBuilder extends RouteBuilder{ private static final String IN_QUEUE="activemq:myqueue.in?messageConverter=#myMessageConverter"; @Override public void configure(){ from(IN_QUEUE).choice() .when(header("JMSType"