New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EJBCLIENT-241 Shut down executor service in EJBClientContext #283
Conversation
Aren't you getting rejection execution exception with this change ? |
So far I didn't notice, I'll do some more experiments. Are you getting those or just suspecting? |
I just suspect that could happen... but very edge cases. You should ask David. I remember that the shutdown was there at some point but cannot remember when. |
I checked the code once more - tasks are submitted to
Intuitively I think none of these methods should be called on closed context, apart perhaps from https://github.com/jbossas/jboss-eap7/blob/7.0.x/ejb3/src/main/java/org/jboss/as/ejb3/remote/DescriptorBasedEJBClientContextService.java#L117 - here it calls unregister and close in correct orther. |
Hmm, that looks quite relevant. |
I think you can bypass the problem related to execute tasks avoiding the rejected execution exception. The trick would be to use the RejectedExecutionHandler somethink like this....
so even if you shutdown the executor you will execute the task in the caller thread... You can add some stacktrace if you are calling the executor after closing the context. |
The thing is I didn't manage to reproduce RejectedExecutionHandler at all. It may've been a problem in earlier version which is now fixed. |
Closing this for now until the other necessary fixes are figured out. |
https://issues.jboss.org/browse/JBEAP-8577
https://issues.jboss.org/browse/EJBCLIENT-241