so based on the cause of that bug, it is impossible to set the body of a jms message to null even if it was transformed earlier. So for example if you had:
jmsmessage (a) -> bean which returns (b) based on that message -> bean c which returned null based on b -> bean d.. d would get (a) again. (note that it doesn't even get b which was after a). On Thu, Mar 24, 2011 at 9:38 PM, Tim <[email protected]> wrote: > I believe you ran into https://issues.apache.org/jira/browse/CAMEL-3354 > > On Thu, Mar 24, 2011 at 5:23 PM, Eric East <[email protected]> wrote: >> Thanks for response. >> >> I narrowed down my test case where I see the issue. >> >> When I initiate a route using a jms activeMQ broker (internal VM), the >> exchange.setBody(null) does not set the body to null. >> >> I am using Camel 2.5. Actvemq 5.4.1 >> >> >> TEST CASE FAILS: >> template.sendBody("activemqVM:topic:tlm", SomeObject); >> from("activemqVM:topic:tlm").to("direct:one") >> >> TEST CASE WORKS: >> template.sendBody("direct:one", SomeObject); >> >> >> ROUTE >> from("direct:one") >> .log("processing ${in.body}") >> .process(new Processor(){ >> public void process(Exchange exchange)throws Exception{ >> exchange.getIn().setBody(null); >> } >> }) >> .log("new body: [${in.body}]") >> .choice() >> .when().simple("${in.body} != null") >> .log(" != null") >> .otherwise() >> .log(" == null"); >> >> --Eric >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/choice-when-check-BodyType-null-Body-null-tp4259599p4263203.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >
