Announcement Announcement Module
No announcement yet.
MDP not getting invoked on using DMLC Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I'd tried earlier to have my customized Exception class to extend MessagingException but it does not give me the "failed message" out of it (i.e., it does not give my original payload from getFailedMessage() method).

    I haven't tried throwing MessagingException from my interceptor but just want to know in case I do that, will it give me the payload through getFailedMessage() method ?
    Or the only solution is, first I "set" my payload in the setFailedMessage() method and then throw MessagingException from the interceptor ?



    • #17
      You can add the message to the constructor of the exception (just implement some of the superclass constructors that takes a message as well as a description).

      However, as a general comment, we don't generally advise putting so much business logic in an interceptor; they are typically used for lightweight stuff such as wire taps/logging etc.

      It's generally better to add this kind of functionality in a <service-activator/> early in the flow.