Bug 1032656 - [GSS] (6.3.1) java.util.concurrent.RejectedExecutionException if a remote-naming InitialContext should be closed
Summary: [GSS] (6.3.1) java.util.concurrent.RejectedExecutionException if a remote-nam...
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.1.1,6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.3.1
Assignee: baranowb
QA Contact: Jan Martiska
Russell Dickenson
URL:
Whiteboard:
Keywords: Triaged
Depends On: 1118432
Blocks: eap631-blockers, eap631-payload, eap63-cp01-blockers 1104255
TreeView+ depends on / blocked
 
Reported: 2013-11-20 14:34 UTC by wfink
Modified: 2018-12-09 17:18 UTC (History)
4 users (show)

(edit)
java.util.concurrent.RejectedExecutionException can occur when ejb-client scoped context or remote-naming is used for calling remote EJBs as depending on the timing the executor could have been shutdown before some clean up tasks had run which could leak in the case of scoped context.
Clone Of:
(edit)
Last Closed: 2014-10-13 18:38:23 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker EJBCLIENT-98 Major Resolved java.util.concurrent.RejectedExecutionException if a remote-naming InitialContext should be closed 2018-02-23 03:50 UTC

Description wfink 2013-11-20 14:34:46 UTC
If a InitialContext use the remote-naming approach and close the Context after use a RejectedExcecutionException is thrown at the client side.

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 1 baranowb 2014-08-08 06:15:27 UTC
Moving to POST, since PR is up. 

https://github.com/jbossas/jboss-ejb-client/pull/67

Comment 5 Jan Martiska 2014-08-28 11:55:44 UTC
Verified in EAP 6.3.1.CR1 / ejb client 1.0.26.Final


Note You need to log in before you can comment on or make changes to this bug.