On Thu, 04 Nov 2010 11:23:46 +0100, Bruno Dusausoy <[email protected]>
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.