Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Setting exchange out body

$
0
0
In a processor I have code similar to this:

Car car = new Car();
List<Car> cars = new ArrayList<Car>();
cars.add(car);

exchange.getOut().setBody(cars, List.class);

The exchange goes to a jms queue that is processed in another processor. But
calling exchange.getIn().getBody() in this processor returns a string (seams
like the toString method of the list is called) instead of the list.

What should be done, so the message body remains a list when inspected in
the next processor?

Thank you,

Viewing all articles
Browse latest Browse all 5648

Trending Articles