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.

Reply via email to