tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r531306 - in /tomcat: container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ container/tc5.5.x/webapps/docs/ jasper/tc5.5.x/src/share/org/apache/jasper/runtime/
Date Mon, 23 Apr 2007 00:32:43 GMT
Author: markt
Date: Sun Apr 22 17:32:43 2007
New Revision: 531306

URL: http://svn.apache.org/viewvc?view=rev&rev=531306
Log:
Fix some logging related memory leaks. This fixes 41272 and the root cause of 41939.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ManagerBase.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java?view=diff&rev=531306&r1=531305&r2=531306
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
Sun Apr 22 17:32:43 2007
@@ -168,6 +168,8 @@
 
         super();
 
+        log =  LogFactory.getLog(ApplicationDispatcher.class);
+
         // Save all of our configuration parameters
         this.wrapper = wrapper;
         this.context = (Context) wrapper.getParent();
@@ -191,7 +193,7 @@
 
     // ----------------------------------------------------- Instance Variables
 
-    private static Log log = LogFactory.getLog(ApplicationDispatcher.class);
+    private Log log = null;
 
     /**
      * The Context this RequestDispatcher is associated with.

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ManagerBase.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ManagerBase.java?view=diff&rev=531306&r1=531305&r2=531306
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ManagerBase.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ManagerBase.java
Sun Apr 22 17:32:43 2007
@@ -62,7 +62,7 @@
  */
 
 public abstract class ManagerBase implements Manager, MBeanRegistration {
-    protected Log log = LogFactory.getLog(ManagerBase.class);
+    protected Log log = null;
 
     // ----------------------------------------------------- Instance Variables
 
@@ -692,11 +692,14 @@
             Registry.getRegistry(null, null).unregisterComponent(oname);
         initialized=false;
         oname = null;
+        log = null;
     }
     
     public void init() {
         if( initialized ) return;
         initialized=true;        
+        
+        log = LogFactory.getLog(ManagerBase.class);
         
         if( oname==null ) {
             try {

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=531306&r1=531305&r2=531306
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sun Apr 22 17:32:43 2007
@@ -67,6 +67,10 @@
         org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES to
         false will stop these fields being set to null on context stop. (markt)
       </fix>
+      <fix>
+        Fix a logging related memory leak in ManagerBase and
+        ApplicationDispatcher. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Webapps">
@@ -160,6 +164,9 @@
       <fix>
         <bug>42072</bug> Don't call destroy() if the associated init() fails.
         Patch provided by Kawasima Kazuh. (markt)
+      </fix>
+      <fix>
+        Fix a logging related memory leak in PageContextImpl. (markt)
       </fix>
     </changelog>
   </subsection>

Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java
URL: http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java?view=diff&rev=531306&r1=531305&r2=531306
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/runtime/PageContextImpl.java Sun Apr
22 17:32:43 2007
@@ -101,8 +101,6 @@
      * Constructor.
      */
     PageContextImpl(JspFactory factory) {
-        log = LogFactory.getLog(getClass());
-
         this.variableResolver = new VariableResolverImpl(this);
         this.outs = new BodyContentImpl[0];
         this.attributes = new Hashtable(16);
@@ -130,6 +128,8 @@
                              boolean autoFlush) throws IOException {
 
         // initialize state
+        log = LogFactory.getLog(getClass());
+
         this.servlet = servlet;
         this.config = servlet.getServletConfig();
         this.context = config.getServletContext();
@@ -199,6 +199,8 @@
         session = null;
 
         attributes.clear();
+        
+        log = null;
     }
 
     public Object getAttribute(final String name) {



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


Mime
View raw message