Author: markt Date: Fri May 6 19:01:45 2016 New Revision: 1742592 URL: http://svn.apache.org/viewvc?rev=1742592&view=rev Log: Remove another unnecessary option from the memory leak protection
Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/config/listeners.xml 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=1742592&r1=1742591&r2=1742592&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Fri May 6 19:01:45 2016 @@ -87,21 +87,6 @@ public class JreMemoryLeakPreventionList this.gcDaemonProtection = gcDaemonProtection; } - /** - * Protects 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; - } - /** * Protect against the memory leak, when the initialization of the * Java Cryptography Architecture is triggered by initializing @@ -260,18 +245,6 @@ public class JreMemoryLeakPreventionList } } - /* - * Initializing javax.security.auth.login.Configuration retains a static reference to the context - * class loader. - */ - if (securityLoginConfigurationProtection) { - try { - Class.forName("javax.security.auth.login.Configuration", true, ClassLoader.getSystemClassLoader()); - } catch(ClassNotFoundException e) { - // Ignore - } - } - /* * Creating a MessageDigest during web application startup * initializes the Java Cryptography Architecture. Under certain Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1742592&r1=1742591&r2=1742592&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Fri May 6 19:01:45 2016 @@ -193,6 +193,12 @@ 8 onwards and Tomcat 9 requires Java 8 so the option is unnecessary. (markt) </scode> + <scode> + Remove the <code>securityLoginConfigurationProtection</code> option from + the <code>JreMemoryLeakPreventionListener</code>. The leak is fixed in + Java 8 onwards and Tomcat 9 requires Java 8 so the option is + unnecessary. (markt) + </scode> </changelog> </subsection> <subsection name="Coyote"> Modified: tomcat/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1742592&r1=1742591&r2=1742592&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/trunk/webapps/docs/config/listeners.xml Fri May 6 19:01:45 2016 @@ -226,16 +226,6 @@ <code>true</code>.</p> </attribute> - <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 provoke 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 class loader to ensure that the static initializer is not - triggered by a web application. Defaults to <code>true</code>.</p> - </attribute> - <attribute name="tokenPollerProtection" required="false"> <p>Enables protection so that any token poller thread initialized by <code>sun.security.pkcs11.SunPKCS11.initToken()</code> does not --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org