简体   繁体   English

Spring GWT http请求超时

[英]Spring GWT http request timeout

I'm using GWT and Spring controller to manage http traffic. 我正在使用GWT和Spring控制器来管理http流量。 Some of the requests may take long time, but I want to kill requests when exceeds the given time. 一些请求可能需要很长时间,但是我想在超过给定时间时终止请求。

How can I configure spring with timeout. 如何配置带有超时的spring。 I use also Apache Tomcat 7.0 . 我也使用Apache Tomcat 7.0 I tried to insrease max thread on tomcat but with a time tomcat works slowly because request threads not die. 我试图增加tomcat上的最大线程,但是随着时间的推移,tomcat的工作速度很慢,因为请求线程不会消失。

Make your Async interface return com.google.gwt.http.client.Request instance and use a timer to cancel the request. 使您的Async接口返回com.google.gwt.http.client.Request实例,并使用计时器取消请求。 Not sure what you mean about the Spring controller. 不确定您对Spring控制器的含义。

com.google.gwt.http.client.Request

An HTTP request that is waiting for a response. Requests can be queried for their pending status or they can be canceled

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM