Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Unclear message set for MessageRejectedException

  1. #11

    Default

    Quote Originally Posted by Gary Russell View Post
    ...no, an id is not allowed in that case. (Chains are black boxes after all).
    Sorry it took so long for me to articulate the issue!

    Hmm, so in terms of exception logging the chain ID solution is the best that can be currently done it seems. It's helpful, but doesn't seem ideal to me. Though it might be very low priority, is there any hope for enhancing the exception message?

    Would it be appropriate for the filter bean to throw its own exception rather than relying on the throw-exception-on-rejection attribute?

    On second thought, I guess the current message is probably fine.

  2. #12
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,022

    Default

    The problem is that the beans within a chain are not first class beans (from the application context perspective); even if we gave them ids, the beanName would not be automatically populated; we'd have to add code. We added the ...handler#n stuff to provide some context in a Spring Insight trace and so getting it in the exception in this context was "free". In fact, even if we populated the id, currently, the chain would overwrite it with this value.

    Given that there's a reasonable (albeit not perfect) solution, you are right, it would likely not get high priority but feel free to open a JIRA if you feel strongly.

    Yes, the filter could throw its own exception, but it will be wrapped (become the cause of) a MessageHandlingException.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •