Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-1888

Review Context Association

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: