diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 76245ab7871..efddde4bb85 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -29960,7 +29960,8 @@ To use Servlet 3 async request processing, you need to update `web.xml` to versi ---- ... @@ -29975,6 +29976,43 @@ ASYNC dispatcher type. Note that it is safe to enable the ASYNC dispatcher type filters provided with the Spring Framework since they will not get involved in async dispatches unless needed. +[WARNING] +==== +Note that for some Filters it is absolutely critical to ensure they are mapped to +be invoked during asynchronous dispatches. For example if a filter such as the +`OpenEntityManagerInViewFilter` is responsible for releasing database connection +resources and must be invoked at the end of an async request. + +Below is an example of a propertly configured filter: +==== + +[source,xml,indent=0] +[subs="verbatim,quotes"] +---- + + + + Spring OpenEntityManagerInViewFilter + org.springframework.~.OpenEntityManagerInViewFilter + true + + + + Spring OpenEntityManagerInViewFilter + /* + REQUEST + ASYNC + + + + +---- + If using Servlet 3, Java based configuration, e.g. via `WebApplicationInitializer`, you'll also need to set the "asyncSupported" flag as well as the ASYNC dispatcher type just like with `web.xml`. To simplify all this configuration, consider extending