1 Reply Latest reply on Dec 9, 2003 11:03 AM by michaelbecker

    3.0.7 - Interrupted while requesting permit

    michaelbecker

      I am running into an interesting error in 3.0.7 with a stateful session bean using Container managed transactions. We are performing numerous (approx. 10,000) insert statements (using JDBC, no entity beans) in a single call to the EJB. The call to the EJB successfully returns to the object which called it, however on the next call to the EJB, it's retrieval of a Connection from the data source returns the below exception. It also appears that the large transaction was rolled back by the database. This only happens when our database server itself was being maxed out (Oracle database 9.2.0.4, using Oracle's Thin JDBC drivers) - running at about 90% OS utilization.

      org.jboss.util.NestedSQLException: Interrupted while requesting permit!; - nested throwable: (javax.resource.ResourceException: Interrupted while requesting permit!)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
      at com.bts.j2ee.ejb.buscontrol.BusinessController.getPooledConnection(BusinessController.java:122)
      at com.bts.financing.ejb.buscontrol.MaintainFinancingControllerBean.loadSection(MaintainFinancingControllerBean.java:1251)
      at sun.reflect.GeneratedMethodAccessor963.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:824)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:268)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
      at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: javax.resource.ResourceException: Interrupted while requesting permit!
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:187)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:335)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.getManagedConnection(LocalTxConnectionManager.java:221)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:828)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      ... 27 more

      Any ideas?

        • 1. Re: 3.0.7 - Interrupted while requesting permit
          michaelbecker

          After doing some more research, this occurred after the writing transaction Timed out (the process of building all of those sql statements exceeded the 5 minutes as configured in jboss-service.xml).

          The odd thing that a developer might want to look at is that the call from the client returned successfully, but the information was actually rolled back. The error then occurred on the next call to the EJB. That does not sound intuitive from a user's perspective.

          So, here's the steps of things that happened:

          1. EJB Starts long transaction from connection pool 1.
          2. After 5 minutes, the TransactionManager times it out (2003-12-09 09:23:22,616 WARN [org.jboss.tm.TxCapsule] Transaction XidImpl [FormatId=257, GlobalId=Beckerlaptop//9, BranchQual=] timed out. status=STATUS_ACTIVE)
          3. The method continues and returns successfully to the calling client, rolling back the data, without notification.
          4. The next call into the EJB attempts to pull from connection pool 2 and gets the below error.

          Can someone confirm if this behavior is expected?