camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dusausoy <bdusau...@yp5.be>
Subject Re: Request reply
Date Thu, 04 Nov 2010 12:33:42 GMT
On Thu, 04 Nov 2010 11:23:46 +0100, Bruno Dusausoy <bdusausoy@yp5.be>
wrote:
> Hi,
> 
[...]
> 
> So my question is : "is there a difference between setting the
> exchangePattern option and using the inOut() method ?"
> 
[...]

Ok, I think I've tightened the scope of the problem.
This code doesn't work (as explained before) :

from("file:src/data?noop=true").to("jms:incomingOrders");
from("jms:incomingOrders")
    .inOut("jms:xmlOrders");
// ValidatorBean.validate() always return the boolean value "true".
from("jms:xmlOrders")
    .bean(ValidatorBean.class, "validate")
    .to("jms:valid");
from("jms:valid").to("stream:out");


If I use exactly the same, only replacing 

from("jms:incomingOrders")
    .inOut("jms:xmlOrders");

with 

from("jms:incomingOrders")
    .to("jms:xmlOrders?exchangePattern=InOut");

It works as expected, resulting in displaying "true" to the console.

*But*

When removing the last route and the .to("jms:valid"), like this :

from("file:src/data?noop=true").to("jms:incomingOrders");
from("jms:incomingOrders")
    .inOut("jms:xmlOrders");
from("jms:xmlOrders")
    .bean(ValidatorBean.class, "validate");

it always work, either by using inOut() or the to() with
"exchangePattern=InOut" option.

Can someone tell me why is it this way ?

Regards.
-- 
Bruno Dusausoy
YP5 Software
--
Pensez environnement : limitez l'impression de ce mail.
Please don't print this e-mail unless you really need to.

Mime
View raw message