Hi Claus,
I do believe that this issue (not returning an exception in the JMS
response) is indeed a bug. If you could get someone's attention about this,
I'd really appreciate it. That said, I think my workaround will be adequate,
although did discover a problem with my subclass of JmsProducer. Here's a
fixed version.
Thanks again for the help!
public class MyJmsProducer extends
org.apache.camel.component.jms.JmsProducer {
public MyJmsProducer(JmsEndpoint endpoint) {
super(endpoint);
}
@Override
public void process(final Exchange exchange) {
super.process(exchange);
if (exchange.getOut() != null) {
Object object =
((JmsEndpoint)getEndpoint()).getBinding().extractBodyFromJms(exchange,
((JmsMessage)
exchange.getOut()).getJmsMessage());
if (object instanceof Throwable) {
exchange.setException((Throwable)
exchange.getOut().getBody());
exchange.setOut(null);
}
}
}
}
--
View this message in context:
http://www.nabble.com/Handling-Bean-exceptions-tp17671948s22882p17703450.html
Sent from the Camel - Users mailing list archive at Nabble.com.