Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14905

Allow the use of multiple thread pools in asynchronous EJBs

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Explained
    • Affects Version/s: 24.0.0.Beta1
    • Fix Version/s: None
    • Component/s: EJB
    • Labels:
      None

      Description

      Currently, all asynchronous EJBs use a single thread pool (configured through the async configuration in the ejb3 subsystem).

      I'm facing a problem in a project regarding nested asynchronous EJBs: if the first asynchronous call uses all async threads available, all threads end up stopping on the next async call, waiting for a thread which will never exist, resulting in a timeout. I've managed to "fix" this by using @Asynchronous only at the first async point and using ManagedExecutorService at the second. It works, but there's a lot more boilerplate code, since there's a need to "bridge" two EJBs with a Callable, using CDI to manually lookup the second EJB.

      If there was a way to configure multiple async thread pools for different EJBs, a lot of good optimizations would be possible.

        Attachments

          Activity

            People

            Assignee:
            cfang Cheng Fang
            Reporter:
            lalves91 Lincoln Alves Moraes Correa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: