1 Reply Latest reply on Oct 12, 2010 12:28 AM by Gabor Jakab

    WebService Timeout using JBoss Seam and RestEasy

    Diego Dias Newbie

      I am trying to implement a timeout to some webservices requests using seam/resteasy..


      I have tried using transactional timeout on JBoss but it not only ends the transaction (so the WS ends) but also ends all other WS running using transaction..


      How can I implement the timeout for each WebService call. EX: a @GET might have a 3min timeout, a @POST 10min timeout...

        • 1. Re: WebService Timeout using JBoss Seam and RestEasy
          Gabor Jakab Newbie

          The @Suspend annotation tells Resteasy that the HTTP request/response should be detached from the currently executing thread and that the current thread should not try to automaticaly process the response. The argument to @Suspend is a timeout in milliseconds until the request will be cancelled.


          On the other hand you can implement and use a custom Seam Interceptor or a Servlet Filter in the front end depending on your requirements around this.