On 03/12/2010 22:19, slaur...@apache.org wrote:
> Author: slaurent
> Date: Fri Dec  3 22:19:11 2010
> New Revision: 1042029
> 
> URL: http://svn.apache.org/viewvc?rev=1042029&view=rev

Comments in-line.

> Modified: 
> tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1042029&r1=1042028&r2=1042029&view=diff
> ==============================================================================
> --- 
> tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
>  (original)
> +++ 
> tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
>  Fri Dec  3 22:19:11 2010
> @@ -107,7 +107,21 @@ public class JreMemoryLeakPreventionList
>           this.securityPolicyProtection = securityPolicyProtection;
>       }
>       
> -    /**
> +     /**
> +      * Protect against the memory leak caused when the first call to
> +      * <code>javax.security.auth.login.Configuration</code> is triggered by 
> a web
> +      * application. This first call populate a static variable with a 
> reference
> +      * to the context class loader. Defaults to <code>true</code>.
> +      */
> +     private boolean securityLoginConfigurationProtection = true;
> +     public boolean isSecurityLoginConfigurationProtection() {
> +         return securityLoginConfigurationProtection;
> +     }
> +     public void setSecurityLoginConfigurationProtection(boolean 
> securityLoginConfigurationProtection) {
> +         this.securityLoginConfigurationProtection = 
> securityLoginConfigurationProtection;
> +     }
Tomcat code style is to limit line length to a maximum of 80 characters.
No all files stick to this but new code generally should.

>    <subsection name="Catalina">
>      <changelog>
>        <add>
> +        <bug>50282</bug>: Load 
> <code>javax.security.auth.login.Configuration</code>
> +        with <code>JreMemoryLeakPreventionListener</code> to avoid memory 
> leak
> +        when stopping a webapp that would use JAAS.
> +        (slaurent)
> +      </add>
> +      <add>
webapp is usually written in full as web application in the change log.

> +      <attribute name="securityLoginConfigurationProtection" 
> required="false">
> +        <p>Enables protection so that usage of the
> +        <code>javax.security.auth.login.Configuration</code> class by a web 
> +        application does not in a memory leak. The first access of this 
> class will
> +        trigger the initializer that will retain a static reference to the 
> context
> +        class loader. The protection loads the class with the system 
> classloader 
> +        to ensure that the static initializer is not triggered by web 
> application.
> +        Defaults to <code>true</code>.</p>
> +      </attribute>
classloader should be written as class loader.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to