[tomcat] branch main updated: Add Javadoc comment about nesting of server-wide listeners
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new fab59e5 Add Javadoc comment about nesting of server-wide listeners fab59e5 is described below commit fab59e5e07082b067060f16921c028f3d1991ae4 Author: Michael Osipov AuthorDate: Mon Nov 1 09:18:47 2021 +0100 Add Javadoc comment about nesting of server-wide listeners --- java/org/apache/catalina/core/AprLifecycleListener.java | 3 +++ .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 3 +++ .../apache/catalina/core/ThreadLocalLeakPreventionListener.java | 8 ++-- .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 3 +++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/VersionLoggerListener.java | 4 webapps/docs/changelog.xml| 4 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index 9ff9496..d92ac14 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -25,6 +25,7 @@ import java.util.List; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.Library; @@ -38,6 +39,8 @@ import org.apache.tomcat.util.res.StringManager; /** * Implementation of LifecycleListener that will init and * and destroy APR. + * + * This listener must only be nested within {@link Server} elements. * * @since 4.1 */ diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index dce3cfe..47c5624 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -25,6 +25,7 @@ import javax.imageio.ImageIO; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; @@ -42,6 +43,8 @@ import org.apache.tomcat.util.res.StringManager; * Locked files usually occur when a resource inside a JAR is accessed without * first disabling Jar URL connection caching. The workaround is to disable this * caching by default. + * + * This listener must only be nested within {@link Server} elements. */ public class JreMemoryLeakPreventionListener implements LifecycleListener { diff --git a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java index f13b19a..9000576 100644 --- a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java +++ b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java @@ -34,19 +34,15 @@ import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadPoolExecutor; /** - * * A {@link LifecycleListener} that triggers the renewal of threads in Executor * pools when a {@link Context} is being stopped to avoid thread-local related * memory leaks. - * * * Note : active threads will be renewed one by one when they come back to the * pool after executing their task, see * {@link org.apache.tomcat.util.threads.ThreadPoolExecutor}.afterExecute(). - * - * - * This listener must be declared in server.xml to be active. - * + * + * This listener must only be nested within {@link Server} elements. */ public class ThreadLocalLeakPreventionListener extends FrameworkListener { diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index bca1ed7..d6d7506 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -31,6 +31,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Role; +import org.apache.catalina.Server; import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.juli.logging.Log; @@ -42,6 +43,8 @@ import org.apache.tomcat.util.res.StringManager; * Implementation of LifecycleListener that instantiates the * set of MBeans associated with global JNDI re
[tomcat] branch 10.0.x updated: Add Javadoc comment about nesting of server-wide listeners
This is an automated email from the ASF dual-hosted git repository. michaelo 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 8fe8c81 Add Javadoc comment about nesting of server-wide listeners 8fe8c81 is described below commit 8fe8c814bbc48d6ddbc1cd721096ababac637fa9 Author: Michael Osipov AuthorDate: Mon Nov 1 09:18:47 2021 +0100 Add Javadoc comment about nesting of server-wide listeners --- java/org/apache/catalina/core/AprLifecycleListener.java | 3 +++ .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 1 + .../apache/catalina/core/ThreadLocalLeakPreventionListener.java | 8 ++-- .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 3 +++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/VersionLoggerListener.java | 4 webapps/docs/changelog.xml| 4 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index 9ff9496..d92ac14 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -25,6 +25,7 @@ import java.util.List; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.Library; @@ -38,6 +39,8 @@ import org.apache.tomcat.util.res.StringManager; /** * Implementation of LifecycleListener that will init and * and destroy APR. + * + * This listener must only be nested within {@link Server} elements. * * @since 4.1 */ diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index b3c56a5..12bf11e 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -33,6 +33,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; diff --git a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java index f13b19a..9000576 100644 --- a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java +++ b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java @@ -34,19 +34,15 @@ import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadPoolExecutor; /** - * * A {@link LifecycleListener} that triggers the renewal of threads in Executor * pools when a {@link Context} is being stopped to avoid thread-local related * memory leaks. - * * * Note : active threads will be renewed one by one when they come back to the * pool after executing their task, see * {@link org.apache.tomcat.util.threads.ThreadPoolExecutor}.afterExecute(). - * - * - * This listener must be declared in server.xml to be active. - * + * + * This listener must only be nested within {@link Server} elements. */ public class ThreadLocalLeakPreventionListener extends FrameworkListener { diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index bca1ed7..d6d7506 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -31,6 +31,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Role; +import org.apache.catalina.Server; import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.juli.logging.Log; @@ -42,6 +43,8 @@ import org.apache.tomcat.util.res.StringManager; * Implementation of LifecycleListener that instantiates the * set of MBeans associated with global JNDI resources that are subject to * management. + * + * This listener must only be nested within {@link Server} elements. * * @author Craig R. McClanahan * @since 4.1 diff --git a/java/org/apache/catalina/security/SecurityListener.java b/java/org/apache/catalina/security/SecurityListener.java index 782753f..cee5ae0 100644 --- a/java/org/apache/catalina/security/Security
[tomcat] branch 9.0.x updated: Add Javadoc comment about nesting of server-wide listeners
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 9a5c21c Add Javadoc comment about nesting of server-wide listeners 9a5c21c is described below commit 9a5c21cb604edd63e28a343f3603e79ab792074b Author: Michael Osipov AuthorDate: Mon Nov 1 09:18:47 2021 +0100 Add Javadoc comment about nesting of server-wide listeners --- java/org/apache/catalina/core/AprLifecycleListener.java | 3 +++ .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 1 + .../apache/catalina/core/ThreadLocalLeakPreventionListener.java | 8 ++-- .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 3 +++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/VersionLoggerListener.java | 4 webapps/docs/changelog.xml| 4 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index ee2a648..a3bd1db 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -25,6 +25,7 @@ import java.util.List; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.Library; @@ -38,6 +39,8 @@ import org.apache.tomcat.util.res.StringManager; /** * Implementation of LifecycleListener that will init and * and destroy APR. + * + * This listener must only be nested within {@link Server} elements. * * @since 4.1 */ diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index b3c56a5..12bf11e 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -33,6 +33,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; diff --git a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java index f13b19a..9000576 100644 --- a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java +++ b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java @@ -34,19 +34,15 @@ import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadPoolExecutor; /** - * * A {@link LifecycleListener} that triggers the renewal of threads in Executor * pools when a {@link Context} is being stopped to avoid thread-local related * memory leaks. - * * * Note : active threads will be renewed one by one when they come back to the * pool after executing their task, see * {@link org.apache.tomcat.util.threads.ThreadPoolExecutor}.afterExecute(). - * - * - * This listener must be declared in server.xml to be active. - * + * + * This listener must only be nested within {@link Server} elements. */ public class ThreadLocalLeakPreventionListener extends FrameworkListener { diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index bca1ed7..d6d7506 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -31,6 +31,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Role; +import org.apache.catalina.Server; import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.juli.logging.Log; @@ -42,6 +43,8 @@ import org.apache.tomcat.util.res.StringManager; * Implementation of LifecycleListener that instantiates the * set of MBeans associated with global JNDI resources that are subject to * management. + * + * This listener must only be nested within {@link Server} elements. * * @author Craig R. McClanahan * @since 4.1 diff --git a/java/org/apache/catalina/security/SecurityListener.java b/java/org/apache/catalina/security/SecurityListener.java index 782753f..cee5ae0 100644 --- a/java/org/apache/catalina/security/SecurityLi
[tomcat] branch 8.5.x updated: Add Javadoc comment about nesting of server-wide listeners
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 6a58001 Add Javadoc comment about nesting of server-wide listeners 6a58001 is described below commit 6a580010d4f8ffafdc5237402604f91aa1cdd919 Author: Michael Osipov AuthorDate: Mon Nov 1 09:18:47 2021 +0100 Add Javadoc comment about nesting of server-wide listeners --- java/org/apache/catalina/core/AprLifecycleListener.java | 3 +++ .../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 1 + .../apache/catalina/core/ThreadLocalLeakPreventionListener.java | 8 ++-- .../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 3 +++ java/org/apache/catalina/security/SecurityListener.java | 4 java/org/apache/catalina/startup/VersionLoggerListener.java | 4 webapps/docs/changelog.xml| 4 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index 5a35ce7..3546946 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -25,6 +25,7 @@ import java.util.List; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.Library; @@ -38,6 +39,8 @@ import org.apache.tomcat.util.res.StringManager; /** * Implementation of LifecycleListener that will init and * and destroy APR. + * + * This listener must only be nested within {@link Server} elements. * * @since 4.1 */ diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index d7f6f33..c8d4847 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -33,6 +33,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory; +import org.apache.catalina.Server; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.ExceptionUtils; diff --git a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java index b619771..c242eeb 100644 --- a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java +++ b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java @@ -37,19 +37,15 @@ import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadPoolExecutor; /** - * * A {@link LifecycleListener} that triggers the renewal of threads in Executor * pools when a {@link Context} is being stopped to avoid thread-local related * memory leaks. - * * * Note : active threads will be renewed one by one when they come back to the * pool after executing their task, see * {@link org.apache.tomcat.util.threads.ThreadPoolExecutor}.afterExecute(). - * - * - * This listener must be declared in server.xml to be active. - * + * + * This listener must only be nested within {@link Server} elements. */ public class ThreadLocalLeakPreventionListener implements LifecycleListener, ContainerListener { diff --git a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java index b298f7e..125d044 100644 --- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java @@ -31,6 +31,7 @@ import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Role; +import org.apache.catalina.Server; import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.juli.logging.Log; @@ -42,6 +43,8 @@ import org.apache.tomcat.util.modeler.Registry; * Implementation of LifecycleListener that instantiates the * set of MBeans associated with global JNDI resources that are subject to * management. + * + * This listener must only be nested within {@link Server} elements. * * @author Craig R. McClanahan * @since 4.1 diff --git a/java/org/apache/catalina/security/SecurityListener.java b/java/org/apache/catalina/security/SecurityListener.java index 782753f..cee5ae0 100644 --- a/java/org/apache/
[GitHub] [tomcat] michael-o commented on pull request #456: Document conditions under which the AprLifecycleListener can be used …
michael-o commented on pull request #456: URL: https://github.com/apache/tomcat/pull/456#issuecomment-956045402 @ChristopherSchultz I have just generally copied the sentence (verbatim) from the website docs to listeners Javadoc. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org