git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Webapp shutdown hangs on JMS Consumer


Hi all,

I have a webapp deployed on JBoss which connects to an external JMS broker
(ActiveMQ 5.15.4) using the the ActiveMQ resource adapter 5.15.4. The webapp
cannot be undeployed or shutdown because the ActiveMQMessageConsumer blocks.
(The entire JBoss container cannot even stop). Only when the broker is
shutdown, the webapp shutdown is continuing.

A thread dump reveals te following information:

   java.lang.Thread.State: TIMED_WAITING (on object monitor) 	at
java.lang.Object.wait(Native Method) 	at
org.apache.activemq.FifoMessageDispatchChannel.dequeue(FifoMessageDispatchChannel.java:74) 
- locked <0x000000008bc1a1a8> (a java.lang.Object) 	at
org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:486) 
at
org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:653)

The queue is being read by a MessageConsumer like:

Message message = this.consumer.receive(1000);

Any suggestions? In the activeMQ sources I saw that a prefetch policy of 0
causes an indefinite wait, but setting this to a higher value had no result.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html