Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-521

ExceptionListener fired due to async dispatch failure is unable to close the Session/Connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.55.0
    • 0.56.0
    • qpid-jms-client
    • None

    Description

      **When an unexpected failure occurs during the process of dispatching a message to an asynchronous consumer (i.e the work surrounding, but not including, onMessage), the connection ExceptionListener is fired as a result. If the ExceptionListener attempts to close the consumers containing Session or Connection it will currently fail with an javax.jms.IllegalStateException noting an "Illegal invocation from MessageListener callback".

      This happens because the session async dispatch thread is ordinarily not allowed to call these methods, is in keeping with the impl and their API definitions. However, in this case it is not firing onMessage at the time but is rather actually firing onException instead (and has relinquished the session delivery lock). As such the "Illegal invocation" exception is incorrect and the thread calling those operations should be permitted during this scenario.

      Attachments

        Activity

          People

            robbie Robbie Gemmell
            robbie Robbie Gemmell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: