Author: markt Date: Wed Mar 24 16:13:29 2010 New Revision: 927105 URL: http://svn.apache.org/viewvc?rev=927105&view=rev Log: Tracking down a memory leak. Add some debug logging to the mapper.
Added: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/LocalStrings.properties (with props) Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Added: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/LocalStrings.properties?rev=927105&view=auto ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/http/mapper/LocalStrings.properties (added) +++ tomcat/trunk/java/org/apache/tomcat/util/http/mapper/LocalStrings.properties Wed Mar 24 16:13:29 2010 @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mapper.removeWrapper=Removing wrapper from Context [{0}] with path [{1}] \ No newline at end of file Propchange: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/LocalStrings.properties ------------------------------------------------------------------------------ svn:eol-style = native Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=927105&r1=927104&r2=927105&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java Wed Mar 24 16:13:29 2010 @@ -23,6 +23,8 @@ import javax.naming.directory.DirContext import org.apache.tomcat.util.buf.CharChunk; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.buf.Ascii; +import org.apache.tomcat.util.res.StringManager; + import java.util.List; import java.util.ArrayList; @@ -35,8 +37,12 @@ import java.util.ArrayList; public final class Mapper { - private static final org.apache.juli.logging.Log logger = + private static final org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(Mapper.class); + + protected static final StringManager sm = + StringManager.getManager(Mapper.class.getPackage().getName()); + // ----------------------------------------------------- Instance Variables @@ -221,7 +227,7 @@ public final class Mapper { pos = find(hosts, hostName); } if (pos < 0) { - logger.error("No host found: " + hostName); + log.error("No host found: " + hostName); } Host host = hosts[pos]; if (host.name.equals(hostName)) { @@ -328,7 +334,7 @@ public final class Mapper { Context[] contexts = host.contextList.contexts; int pos2 = find(contexts, contextPath); if( pos2<0 ) { - logger.error("No context found: " + contextPath ); + log.error("No context found: " + contextPath ); return; } Context context = contexts[pos2]; @@ -455,6 +461,11 @@ public final class Mapper { } protected void removeWrapper(Context context, String path) { + + if (log.isDebugEnabled()) { + log.debug(sm.getString("mapper.removeWrapper", context, path)); + } + synchronized (context) { if (path.endsWith("/*")) { // Wildcard wrapper --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org