title: Spring MVC - How can I use different timeouts for my resttemplates?
body: <p>I am using Spring MVC with Spring 3.1.  I have a web application that uses many REST services.  One of these REST services takes up to an hour to respond - which I can not change.  I have my timeout for the RestTemplate set up like this with the timeout set to 60 minutes:</p>
  
  <pre><code>&lt;bean id="restTemplate" class="org.springframework.web.client.RestTemplate "&gt;
      &lt;constructor-arg&gt;
          &lt;bean class="org.springframework.http.client.CommonsClientHttpRequestFactory"&gt;
              &lt;property name="readTimeout" value="3600000" /&gt;
              &lt;property name="connectTimeout" value="3600000" /&gt;
          &lt;/bean&gt;
      &lt;/constructor-arg&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I would like to be able to set all of my other REST calls to a different set of timeouts.  Any ideas on how to do this?</p>
  
  <p>Thanks,</p>
  
  <p>Tim</p>