4 Replies Latest reply on Oct 16, 2012 7:25 PM by nchennareddy

    Http Threads stuck in waiting mode due to HornetQ.

    stewar

      I have simple JMS Producer and receiver both deployed on Jboss As 6.1.0 final.

      HornetQ 2.2.5 is embedded inside AS 6.1.0 final.

       

      Suddenly after some time of execution when i took a thread dump.

       

      I see the following trace :

       

      "http-0.0.0.0-443-150" daemon prio=10 tid=0x000000004c014800 nid=0x164e waiting on condition [0x0000000040089000]

         java.lang.Thread.State: WAITING (parking)

              at sun.misc.Unsafe.park(Native Method)

              - parking to wait for  <0x00000007796eedd0> (a java.util.concurrent.Semaphore$NonfairSync)

              at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)

              at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)

              at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)

              at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)

              at java.util.concurrent.Semaphore.acquire(Semaphore.java:441)

              at org.hornetq.core.client.impl.ClientProducerCreditsImpl.acquireCredits(ClientProducerCreditsImpl.java:74)

              at org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:305)

              at org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:142)

              at org.hornetq.jms.client.HornetQMessageProducer.doSend(HornetQMessageProducer.java:451)

              at org.hornetq.jms.client.HornetQMessageProducer.send(HornetQMessageProducer.java:199)

              at com.example.util.JMSMessageDeliveryHelper.sendMessageWithSession(JMSMessageDeliveryHelper.java:115)

       

       

      I even drilled to the org.hornetq.core.client.impl.ClientProducerCreditsImpl seems like it acquires thread locks at line no 74.

      any help would be appreciated.

       

      The message has persistence policy, all default hornetQ configurations are used.

      the code is a basic JMS sender receiver.. using same ConnectionFactory and Connection objects,

      but creating session and producer per message.