Re: Clarification regarding ManagedExecutorService in Rx Client
toggle quoted messageShow quoted text
as much as I would love to work on JAX-RS 2.1.1, 2.2 or 3.0, actually this is impossible at the moment. The reason is that JAX-RS is to be migrated from Oracle to the Eclipse Foundation. At the moment, it is unclear under which conditions and in what timeframe a maintenance release of the JAX-RS Specification PDF could be published. Also at the moment, it is unclear if such a maintenance release would be standardized by the JCP, or by a different organization. I am sorry not to be able to give a better answer, but it is all in the hands of Oracle's lawyers and the PMC still.
I have CC'ed IBM's PMC member Kevin Suter. Maybe he has an updated schedule on this he is willing to share with you.
Regarding the question itself, the JAX-RS specification does not make any assumptions upon invoking users. In particular, a scenario where three users / three threads share and extend one single "fiber" is not part of JAX-RS. Hence, the specification leaves this open intentionally but just says that context capture "has to work". Could you elaborate how such a scenario could look like, where three threads invoked by three different users have access to the same "fiber"?
EG JSR 370
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Andy McCright
Sent: Dienstag, 12. Dezember 2017 23:44
Subject: [jaxrs] Clarification regarding ManagedExecutorService in Rx Client
While working on the JAX-RS 2.1 implementation in Liberty, a colleague of mine discovered some inconsistent behavior related to the reactive client's CompletionStage with regard to executors. He wrote me:
When a ManagedExecutorService is used as the default asynchronous execution facility for a CompletionStage created by a JAX-RS client's CompletionStageRxInvoker, the specification is currently unclear as to exactly when thread context should be captured for propagation to the CompletionStage and its dependent stages.
Would it be possible to clarify this in the spec - perhaps as part of a maintenance release? If it would help, I could draft up some text and submit a pull request.
Thanks in advance for your review,