Actually, in line with the above answer, the only way I found to set and
preserve headers in a catch block is to set the headers on the original message
acquired through the unit of work (which can be accessed through the exchange).
For example:
try{
//doing something awseome with my component
} catch(SomeException se) {
exchange
.getUnitOfWork()
.getOriginalInMessage()
.getHeaders()
.put(“MySpecialHeader”,”MySpecialValue");
exchange.setException(se) //or throw
}
/dcb
David C. Bauer
email: [email protected] <mailto:[email protected]>
skype: tucsonalama
mobile: 801-995-0516