Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1989

Setup actions are not executed when using the async Start method

XMLWordPrintable

      Since UNDERTOW-781 the setup actions are not executed when an async servlet executes the start method. For example consider a servlet like the following:

      @WebServlet(urlPatterns = "/async-module", asyncSupported = true)
      public class AnAsyncServlet extends HttpServlet {
      
          @Override
          public final void doGet(final HttpServletRequest request, HttpServletResponse response)
                  throws ServerException, IOException {
              final AsyncContext asyncContext = request.startAsync();
              asyncContext.start(new Processing("java:module/ApplicationConfig!org.jboss.ConfigInterface",
                      (HttpServletResponse) asyncContext.getResponse()));
          }
      }
      

      The Processing runnable is executed in a new thread that has not executed the setup actions and therefore some jakarta ee features are not available for it (for example looking up some jndi namespaces).

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-rmartinc Ricardo Martin Camarero
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: