-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.5.GA
-
None
-
Low
-
Workaround Exists
-
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.