You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/06/23 09:40:20 UTC

svn commit: r957130 - in /tomcat/trunk/java/org/apache/catalina/core: JreMemoryLeakPreventionListener.java LocalStrings.properties

Author: markt
Date: Wed Jun 23 07:40:19 2010
New Revision: 957130

URL: http://svn.apache.org/viewvc?rev=957130&view=rev
Log:
Improve the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49230
Don't log an error about loading Sun class on non-Sun JVMs. Use i18n for message.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
    tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties

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=957130&r1=957129&r2=957130&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Wed Jun 23 07:40:19 2010
@@ -201,8 +201,13 @@ public class JreMemoryLeakPreventionList
                 try {
                     Class.forName("sun.net.www.http.HttpClient");
                 } catch (ClassNotFoundException e) {
-                    log.error("Could not prevent sun.net.www.http.HttpClient" +
-                    		" from being loaded.", e);
+                    if (System.getProperty("java.vendor").startsWith("Sun")) {
+                        log.error(sm.getString(
+                                "jreLeakListener.keepAliveFail"), e);
+                    } else {
+                        log.debug(sm.getString(
+                                "jreLeakListener.keepAliveFail"), e);
+                    }
                 }
             }
             

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=957130&r1=957129&r2=957130&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Wed Jun 23 07:40:19 2010
@@ -76,6 +76,7 @@ httpEngineMapper.container=This containe
 httpHostMapper.container=This container is not a StandardHost
 interceptorValve.alreadyStarted=InterceptorValve has already been started
 interceptorValve.notStarted=InterceptorValve has not yet been started
+jreLeakListener.keepAliveFail=Failed to trigger creation of the sun.net.www.http.HttpClient class during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs.
 jreLeakListener.gcDaemonFail=Failed to trigger creation of the GC Daemon thread during Tomcat start to prevent possible memory leaks. This is expected on non-Sun JVMs.
 jreLeakListener.jarUrlConnCacheFail=Failed to disable Jar URL connection caching by default
 jreLeakListener.xmlParseFail=Error whilst attempting to prevent memory leaks during XML parsing



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