]
Farah Juma updated ELY-1888:
----------------------------
Fix Version/s: 2.0.0.Alpha7
(was: 2.0.0.Alpha6)
Review Context Association
--------------------------
Key: ELY-1888
URL:
https://issues.jboss.org/browse/ELY-1888
Project: WildFly Elytron
Issue Type: Task
Components: API / SPI, MicroProfile
Reporter: Darran Lofthouse
Priority: Critical
Fix For: 2.0.0.Alpha7
Our APIs are very much written for objects to be associated with the current Thread and
to remain associated either until they are replaced or the call stack returns to the point
where association occurs and the association is automatically removed.
Concurrent APIs are always a problem in this area as a "request" can now
traverse multiple Threads, issues arise in relation to propagation to worker threads but
also potentially in the association for any resulting callbacks / resumption of work
across different threads.
We should double check our relationship with Jakarta Concurrency: -
https://projects.eclipse.org/projects/ee4j.cu
The following specification within MicroProfile is looking into some mechanisms for this
association: -
https://github.com/eclipse/microprofile-context-propagation
It may be preferable for our APIs to remain unchanged but instead we provide sufficient
integration to capture our current context specific instances and propagate them.
As we have more than one item that can be associated we may want to review if we want to
use a single context internally that associates multiple items so we only have one item to
propagate.
Generally the items we associate are immutable so cross Thread modifications are not
likely to be an issue.
Alternatively we may choose to revisit our association APIs.
Overall creating this issue for now as it is an area we will need to investigate further
and plan for - tentatively scheduled against 2.0 although I suspect we will need to handle
this within a 1.x release.