This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push: new 5e44d9d Document conditions of use for AprLifecycleListener to avoid JVM crashes 5e44d9d is described below commit 5e44d9d772b446d2d2506a5d1df8e929b58b8659 Author: Michael Osipov <micha...@apache.org> AuthorDate: Fri Oct 29 11:19:43 2021 +0200 Document conditions of use for AprLifecycleListener to avoid JVM crashes This basically documents how to avoid issues like https://github.com/spring-projects/spring-boot/issues/28472 --- java/org/apache/catalina/core/AprLifecycleListener.java | 6 ++++++ webapps/docs/changelog.xml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index 285abf9..0ab75c1 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -41,6 +41,12 @@ import org.apache.tomcat.util.res.StringManager; * and destroy APR. * <p> * This listener must only be nested within {@link Server} elements. + * <p> + * <strong>Note</strong>: If you are running Tomcat in an embedded fashion and + * have more than one Server instance per JVM, this listener <em>must not</em> + * be added to the {@code Server} instances, but handled outside by the calling + * code which is bootstrapping the embedded Tomcat instances. Not doing so will + * lead to JVM crashes. * * @since 4.1 */ diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 899bfe7..299ed24 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -115,6 +115,10 @@ <bug>65684</bug>: Fix a potential <code>NullPointerException</code> when using JULI. (markt) </fix> + <docs> + Document conditions under which the <code>AprLifecycleListener</code> + can be used to avoid JVM crashes. (michaelo) + </docs> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org