Bug 1118432

Summary: [GSS] (6.4.0) java.util.concurrent.RejectedExecutionException if a remote-naming InitialContext should be closed
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: EJBAssignee: Brad Maxwell <bmaxwell>
Status: VERIFIED --- QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: bbaranow, bmaxwell, kkhan
Target Milestone: DR1   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1104257, 1032656    

Description Brad Maxwell 2014-07-10 17:02:45 UTC
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)

Comment 5 Kabir Khan 2014-08-22 15:44:40 UTC
Setting to MODIFIED since should be solved by ejb-client 1.0.26 upgrade (https://bugzilla.redhat.com/show_bug.cgi?id=1104257)

Comment 6 Jan Martiska 2014-09-18 08:52:07 UTC
Verified in EAP 6.4.0.DR1.1 / ejb client 1.0.26.Final-redhat-1