Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3821

Uncatch JMSException in receive() methods in SpyMessageConsumer.java

XMLWordPrintable

    • Low
    • Workaround Exists
    • Hide

      Close the receiver and open a new one.

      Show
      Close the receiver and open a new one.

      The receive(), receive(long timeout), and receiveNoWait() methods in SpyMessageConsumer.java does not have try/catch JMSException around the "SpyMessage msg = session.connection.receive(subscription, xx)" method call. If JMSException is thrown from this method call, the boolean "receiving" will not get reset.

      Since the variable "receiving" will not get reset to false, if the client tries to get message off the queue in the next iteration, the receive() methods in SpyMessageConsumer will be force to perform "throw new JMSException("Another thread is already in receive.")".

      The only solution to the client is to close the queue connection and open a new queue connection.

              adrian.brock Adrian Brock (Inactive)
              kvn2006 K N (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: