title: Setting timeout in Resteasy, JAX-RS
body: <p>I have some HTTP calls that are very long lasting and I need the results. </p>
  
  <p>How do I extend the timeout on the serverside for these types of calls. <strong>Note</strong> this is not <code>Session-Timeout</code> as defined in the <code>web.xml</code> for the server.</p>
  
  <p>I noticed JAX-RS has an <code>@Timeout</code> notation, but I don't know how to use it, or if it even works with this type of configuration.</p>
  
  <p>My calls are setup like so:</p>
  
  <pre><code>@Path("/path/")
  public class BulkCreate {
      @Path("/path")
      @Produces(MediaType.APPLICATION_JSON)
      @Consumes(MediaType.APPLICATION_JSON)
      public Response query(@QueryParam("token") String token,
              BulkCreateObject[] objects) {
            ....
          }
  }
  </code></pre>
  
  <p>I can't use <a href="https://docs.jboss.org/resteasy/docs/2.3.5.Final/userguide/html/Asynchronous_HTTP_Request_Processing.html" rel="noreferrer">@Suspend</a> or make them totally asynchronous.</p>
  
  <p>I didn't start setting up this project so I don't know what other items are necessary to enable these interfaces, except that they work, but I can't figure out where to set an extended timeout.</p>
  
  <p>I set the timeout on the client-request to a very long time, but the request still times out (I believe on the server-side) and throws a "Timeout Exception" back to the client after ~2-3 minutes?</p>
  
  <p>I can't find anything in the docs <a href="http://resteasy.jboss.org/docs" rel="noreferrer">here</a>.</p>