activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mknut...@baselogic.com>
Subject Re: setting dead Letter header in catch block?
Date Fri, 26 Sep 2008 23:45:22 GMT
I have also tried:

        } catch (Exception e) {

log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
            exchange.getOut().setHeader(Constants.EXCEPTION_MESSAGE,
e.getMessage() + ".....");
            throw new RuntimeException(e);
        }


But this does not work as my Mock still does not get the error:


resultErrorEndpoint.message(0).header(Constants.EXCEPTION_MESSAGE).isNotNull();


This is always null. Can someone help?



On Thu, Sep 25, 2008 at 5:18 PM, Mick Knutson <mknutson@baselogic.com>wrote:

> I have the following block that fails:
>
>         } catch (Exception e) {
>
> log.error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
> *// i want to set deadLetter headers here ******
>             throw new RuntimeException(e);
>         }
>
>
> How can I set my dead letter headers as to the error that occurred? Or is
> there a better way?
>
>
> --
> ---
> Thank You…
>
> Mick Knutson
> BASE Logic, inc.
> (415) 354-4215
>
> Website: http://baselogic.com
> Blog: http://baselogic.com/blog
> BLiNC Magazine: http://blincmagazine.com
> Linked IN: http://linkedin.com/in/mickknutson
> DJ Mick: http://djmick.com
> MySpace: http://myspace.com/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
>
>


-- 
---
Thank You…

Mick Knutson
BASE Logic, inc.
(415) 354-4215

Website: http://baselogic.com
Blog: http://baselogic.com/blog
BLiNC Magazine: http://blincmagazine.com
Linked IN: http://linkedin.com/in/mickknutson
DJ Mick: http://djmick.com
MySpace: http://myspace.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message