From f4e0288357090449ccd435074b98ebca5adc2640 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 19 Nov 2019 16:18:08 +0000 Subject: [PATCH] Remove mentions of Tomcat async request timeout value Close gh-24030 --- .../java/org/springframework/mock/web/MockAsyncContext.java | 4 ++-- .../org/springframework/mock/web/test/MockAsyncContext.java | 4 ++-- .../web/servlet/config/annotation/AsyncSupportConfigurer.java | 4 ++-- .../mvc/method/annotation/RequestMappingHandlerAdapter.java | 2 +- .../org/springframework/web/servlet/config/spring-mvc.xsd | 2 +- src/docs/asciidoc/web/webmvc.adoc | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockAsyncContext.java b/spring-test/src/main/java/org/springframework/mock/web/MockAsyncContext.java index 620439d1ae2..f3c6fcc1ad6 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockAsyncContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockAsyncContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ public class MockAsyncContext implements AsyncContext { @Nullable private String dispatchedPath; - private long timeout = 10 * 1000L; // 10 seconds is Tomcat's default + private long timeout = 10 * 1000L; private final List dispatchHandlers = new ArrayList<>(); diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java index 4c60f1e40df..57784764476 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ public class MockAsyncContext implements AsyncContext { @Nullable private String dispatchedPath; - private long timeout = 10 * 1000L; // 10 seconds is Tomcat's default + private long timeout = 10 * 1000L; private final List dispatchHandlers = new ArrayList<>(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java index 841c38e249b..a43bcb31a54 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ public class AsyncSupportConfigurer { * processing thread has exited and ends when the request is dispatched again * for further processing of the concurrently produced result. *

If this value is not set, the default timeout of the underlying - * implementation is used, e.g. 10 seconds on Tomcat with Servlet 3. + * implementation is used. * @param timeout the timeout value in milliseconds */ public AsyncSupportConfigurer setDefaultTimeout(long timeout) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java index 53eda754d03..7b0f5038ee0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java @@ -414,7 +414,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter * processing thread has exited and ends when the request is dispatched again * for further processing of the concurrently produced result. *

If this value is not set, the default timeout of the underlying - * implementation is used, e.g. 10 seconds on Tomcat with Servlet 3. + * implementation is used. * @param timeout the timeout value in milliseconds */ public void setAsyncRequestTimeout(long timeout) { diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd index 7c6fd031df8..398247f4f91 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc.xsd @@ -253,7 +253,7 @@ Specify the amount of time, in milliseconds, before asynchronous request handling times out. In Servlet 3, the timeout begins after the main request processing thread has exited and ends when the request is dispatched again for further processing of the concurrently produced result. If this value is not set, - the default timeout of the underlying implementation is used, e.g. 10 seconds on Tomcat with Servlet 3. + the default timeout of the underlying implementation is used. ]]> diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index da4f667bf30..71909cf617d 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -4637,7 +4637,7 @@ The MVC configuration exposes the following options related to asynchronous requ You can configure the following: * Default timeout value for async requests, which if not set, depends -on the underlying Servlet container (for example, 10 seconds on Tomcat). +on the underlying Servlet container. * `AsyncTaskExecutor` to use for blocking writes when streaming with <> and for executing `Callable` instances returned from controller methods. We highly recommended configuring this property if you