Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-98

java.util.concurrent.RejectedExecutionException if a remote-naming InitialContext should be closed

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.18.Final, 1.0.23.Final, 1.0.24.Final
    • Fix Version/s: 1.0.26.Final
    • Labels:
      None

      Description

      If a InitialContext use the remote-naming approach and close the Context after use a RejectedExcecutionException is thrown at the client side.

      It seems like that there is no further drawback, i.e. connection leaking, so the error might be ignored safely.

      The stacktrace is from a test with EAP6.1.1 and ejb-client 1.0.23
      INFO: EJBCLIENT000016: Channel Channel ID c7f02e35 (outbound) of Remoting connection 79a0ce4c to localhost/127.0.0.1:4447 can no longer process messages
      org.jboss.remoting3.spi.SpiUtils safeHandleClose
      ERROR: Close handler threw an exception
      java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@6bab735a rejected from java.util.concurrent.ThreadPoolExecutor@452250ef[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
      at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
      at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821)
      at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372)
      at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:110)
      at org.jboss.ejb.client.EJBClientContext.unregisterEJBReceiver(EJBClientContext.java:434)
      at org.jboss.ejb.client.EJBReceiverContext.close(EJBReceiverContext.java:59)
      at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver$1$1.handleClose(RemotingConnectionEJBReceiver.java:152)
      at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver$1$1.handleClose(RemotingConnectionEJBReceiver.java:149)
      at org.jboss.remoting3.spi.SpiUtils.safeHandleClose(SpiUtils.java:54)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.java:501)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:406)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeComplete(AbstractHandleableCloseable.java:277)
      at org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:515)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
      at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:390)
      at org.jboss.remoting3.remote.RemoteConnectionHandler.sendCloseRequest(RemoteConnectionHandler.java:231)
      at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAction(RemoteConnectionHandler.java:376)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
      at org.jboss.remoting3.ConnectionImpl.closeAction(ConnectionImpl.java:52)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
      at org.jboss.remoting3.EndpointImpl.closeAction(EndpointImpl.java:201)
      at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:153)
      at org.jboss.naming.remote.client.EndpointCache.release(EndpointCache.java:61)
      at org.jboss.naming.remote.client.EndpointCache$EndpointWrapper.close(EndpointCache.java:177)
      at org.jboss.naming.remote.client.InitialContextFactory$1.close(InitialContextFactory.java:233)
      at org.jboss.naming.remote.client.RemoteContext.close(RemoteContext.java:191)
      at javax.naming.InitialContext.close(InitialContext.java:550)
      at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.main(RemoteEJBClient.java:50)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dmlloyd David Lloyd
                Reporter:
                wdfink Wolf-Dieter Fink
              • Votes:
                4 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: