4 Replies Latest reply on Sep 30, 2008 11:51 AM by Adrian Brock

    MDB stops servicing any messages (ReceiversCount goes to 0)

    Ravikiran Chittari Newbie

      Environment
      Jboss 4.2.2
      OS RHEL 4.0
      JDK 5.0

      Question:
      I have very simple MDB implementation where I log some data into db asyncrhonously. This implementation works fine except sometimes, it runs to a situation where-in ReceiversCount on the Queue goes to 0 and QueueDepth increases.

      (a) When would the RecieversCount go to zero? ie. the only one receiver associated with this queue is empty or null

      (b) When I look into the logs I see
      javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms
      logged in server.log

      This seems like the thread is already in interrupted state or being interrupted when a simple getConnection() request is made.

      Below is stack trace
      2008-09-14 15:57:51,180 ERROR [org.jboss.resource.adapter.jms.JmsSessionFactoryImpl] could not create session
      javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:309)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
      at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:389)
      at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createSession(JmsSessionFactoryImpl.java:369)



      So, the final question, is are (a) and (b) related? if so, what is the solution?
      I think I gave all info but could add more.

      Any help is greatly appreciated.