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

Allow the use of multiple thread pools in asynchronous EJBs

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Not a Bug
    • Major
    • None
    • 24.0.0.Beta1
    • EJB
    • None
    • Undefined

    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

            cfang@redhat.com Cheng Fang
            lalves91 Lincoln Alves Moraes Correa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: