Results 1 to 4 of 4

Thread: Intercept DMLC to trap exceptions

  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Default Intercept DMLC to trap exceptions

    I have a requirement to intercept the exceptions thrown by DefaultMessageListenerContainer. The requirement is to know if any transaction is rolled back and appropriately set the delay in reading the next message from the queue.
    Also, let me know if there is any alternative to set the delay in reading messages once an unknown exception happens.

    Thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    San Diego
    Posts
    780

    Default

    Message redelivery delay is usually a setting you have to apply to the message provider. You may be able to influence this by setting a special jms header that the provider is aware of. You'd have to check with the documentation for your JMS provider.

  3. #3
    Join Date
    Nov 2008
    Posts
    2

    Default

    Thanks for looking into my problem. I don't have control on the settings that can be made on the JMS provider. Hence finding out an alternate solution which I can handle in my code.
    I have changed task executor to use TimerTaskExecutor in order to handle delay in case of exceptions. My code works fine if any exception is thrown by listener. But fails for exceptions thrown by container.
    How can I handle such exceptions?

    Thanks Again.....

  4. #4
    Join Date
    Jan 2008
    Location
    San Diego
    Posts
    780

    Default

    The appropriate place to handle this is in the provider, not the DMLC or your listener...

Posting Permissions

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