in camel/servicemix-camel/src/main/java/org/apache/servicemix/camel/nmr/ServiceMixConsumer.java [81:102]
public void process(Exchange exchange) {
if (exchange.getStatus() == Status.Active) {
try {
org.apache.camel.Exchange camelExchange = getEndpoint().createExchange(exchange);
camelExchange.addOnCompletion(this);
if (getEndpoint().isSynchronous()) {
getProcessor().process(camelExchange);
// no need to send the response back here, this is handled by the onComplete/onFailure method
} else {
getAsyncProcessor().process(camelExchange, new AsyncCallback() {
public void done(boolean doneSync) {
// this is handled by the onComplete/onFailure method
}
});
}
} catch (Exception e) {
exchange.setError(e);
exchange.setStatus(Status.Error);
channel.send(exchange);
}
}
}