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

Cannot extend timeout from JAX-RS timeout handler

    XMLWordPrintable

Details

    Description

      According to the JAX-RS Javadoc for TimeoutHandler, I should be able to set a new timeout for the timeout handler for suspended responses. It shows this as an example:

       public class MyTimeoutHandler implements TimeoutHandler {
           …
           public void handleTimeout(AsyncResponse ar) {
               if (keepSuspended) {
                   ar.setTimeout(10, SECONDS);
               } else if (cancel) {
                   ar.cancel(retryPeriod);
               } else {
                   ar.resume(defaultResponse);
               }
           }
           …
       }
      

      But calling ar.setTimeout(...) from inside the TimeoutHandler has no effect, and the response is resumed with a 503 Service Unavailable response.

      I should have a fix for this shortly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andymc12 Andy McCright (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: