1 Reply Latest reply on Jun 11, 2004 10:59 AM by Bill Burke

    Interrupted thread not being uninterrupted.

    Ivan O. Parra Novice

      JBoss3.2.1
      JDK1.3.1_06
      Windows 2003

      Every now and then we get:

      javax.resource.ResourceException: Interrupted while requesting permit!at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:188)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.getConnection(JBossManagedConnectionPool.java:643)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:413)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:488)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:798)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:120)^M
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:91)^M
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.execute(JDBCFindEntitiesCommand.java:40)^M
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntities(JDBCStoreManager.java:599)^M
      at org.jboss.ejb.plugins.CMPPersistenceManager.findEntities(CMPPersistenceManager.java:324)^M
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntities(CachedConnectionInterceptor.java:323)^M
      at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:603)^M
      ...
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)^M
      at $Proxy424.findByNameAndParentId(Unknown Source)^M


      My first assumption is: the TM has timed us out. The current timeout is at 5 minutes, but this call is done 22ms into the transaction. I turned on TRACE on jboss to find the root of the problem. Needless to say, I can't find out why.



      Here is some information that may/may not be pertinent:
      1) We have a MDB that may create multiple calls to stateless session beans. The descriptors are set up(and confirmed via TM Traceing) that the JMS transaction is not associated to the SLSB transactions. IE if 1 message generates 50 calls to SLSB, there will be 51+ transactions created+committed.

      2) Sometimes, the SLSB txs take longer than 5 min and are interrupted by the TM
      a. Since the MDB uses the same thread over multiple tx, I've checked if a previous rollbacks is causing this thread to stay interrupted. I've noticed that most threads have not been interrupted due to a TM timeout before this exception occurs.

      3) Our code does not interrupt the thread.

      4) The Trace information from the TransactionImpl says the status is STATUS_ACTIVE(but the thread is interrupted).

      5) The exception always occurs on a CMP Finder.

      6) The InternalManagedConnectionPool.getConnection does a permit.attempt that checks if the thread is Interrupted and throws an InterruptedException. permit is a FIFOSemaphore from oswego(concurrent.jar).

      7) 100 MDB Max per container(1 MDB deployed). All 100 MDB are being used and there are enough resources for the MDB(200 SLSB, 300 MAX DB connections). Resources are not being saturated.

      I know that concurrent.jar has been update for later release, this does not explain why the Thread is still in an interrupted state.

      Any suggestions??? I've tried recreating it in closed environment, but it can't get the same results.