Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-767

@ServerInterceptor PostProcessor are not processed if asynchronous response is set before PostProcessors are enlisted on the AsyncResponse.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.3.6.Final
    • 2.3.4.Final
    • None
    • None

      ResourceMethod::invokeOnTarget calls methodInjector.invoke() and then sets the PostProcessers afterwards. If the method sets the response directly or the executing thread finishes quicker the PostProcessers /Annotations /MessageBodyWriters do not get processed.

      Object rtn = null;
      try

      { rtn = methodInjector.invoke(request, response, target); }

      catch (WebApplicationException wae)

      { prepareResponse(ServerResponse.copyIfNotServerResponse(wae.getResponse())); throw wae; }

      if (request.isSuspended())

      { AbstractAsynchronousResponse asyncResponse = (AbstractAsynchronousResponse) request.getAsynchronousResponse(); if (asyncResponse == null) return null; asyncResponse.setAnnotations(method.getAnnotations()); asyncResponse.setMessageBodyWriterInterceptors(writerInterceptors); asyncResponse.setPostProcessInterceptors(postProcessInterceptors); return null; }

              rsigal@redhat.com Ronald Sigal
              mvanwely_jira Matt Van Wely (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: