svn commit: r1004550 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/changelog.xml
Author: markt Date: Tue Oct 5 07:30:54 2010 New Revision: 1004550 URL: http://svn.apache.org/viewvc?rev=1004550&view=rev Log: Correct fix fot 49669 Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/trunk/webapps/docs/changelog.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=1004550&r1=1004549&r2=1004550&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Tue Oct 5 07:30:54 2010 @@ -23,9 +23,9 @@ import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.security.Policy; import javax.imageio.ImageIO; +import javax.security.auth.Policy; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -50,6 +50,7 @@ import org.apache.tomcat.util.res.String * first disabling Jar URL connection caching. The workaround is to disable this * caching by default. */ +...@suppresswarnings("deprecation") public class JreMemoryLeakPreventionListener implements LifecycleListener { private static final Log log = Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1004550&r1=1004549&r2=1004550&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Oct 5 07:30:54 2010 @@ -40,6 +40,10 @@ +49669: Fix memoey leak triggered by using the deprecated +javax.security.auth.Policy class. (markt) + + 49922: Don't add filter twice to filter chain if the filter matches more than one URL pattern and/or Servlet name. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004554 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Oct 5 07:38:18 2010 New Revision: 1004554 URL: http://svn.apache.org/viewvc?rev=1004554&view=rev Log: Proposal Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1004554&r1=1004553&r2=1004554&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Oct 5 07:38:18 2010 @@ -220,3 +220,7 @@ PATCHES PROPOSED TO BACKPORT: +1: timw -1: +* Backport all JRE leak prevention listener changes to tc6 + http://people.apache.org/~markt/patches/2010-10-05-leak-preotection-tc6.patch + +1: markt + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 49669] Static reference from javax.security.auth.Policy.contextClassLoader prevents an undeployed Web application from being garbage collected
https://issues.apache.org/bugzilla/show_bug.cgi?id=49669 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #3 from Mark Thomas 2010-10-05 03:39:12 EDT --- Yep, bad import. Fixed in trunk and will be in 7.0.4 onwards. I also proposed a back-port of all the changes to this listener that haven't yet made it into tc6. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004555 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Tue Oct 5 07:45:04 2010 New Revision: 1004555 URL: http://svn.apache.org/viewvc?rev=1004555&view=rev Log: typo Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1004555&r1=1004554&r2=1004555&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Oct 5 07:45:04 2010 @@ -40,7 +40,7 @@ -49669: Fix memoey leak triggered by using the deprecated +49669: Fix memory leak triggered by using the deprecated javax.security.auth.Policy class. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004562 - in /tomcat/trunk: build.xml webapps/docs/changelog.xml
Author: markt Date: Tue Oct 5 07:55:04 2010 New Revision: 1004562 URL: http://svn.apache.org/viewvc?rev=1004562&view=rev Log: Make sure copyright year is replaced for root webapp Modified: tomcat/trunk/build.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1004562&r1=1004561&r2=1004562&view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Tue Oct 5 07:55:04 2010 @@ -752,7 +752,7 @@ - + Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1004562&r1=1004561&r2=1004562&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Oct 5 07:55:04 2010 @@ -84,6 +84,14 @@ + + + +Apply filters to default home page so copyright year is correctly +displayed. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004564 - /tomcat/trunk/build.xml
Author: markt Date: Tue Oct 5 08:00:08 2010 New Revision: 1004564 URL: http://svn.apache.org/viewvc?rev=1004564&view=rev Log: Make sure copyright year is replaced for root webapp Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1004564&r1=1004563&r2=1004564&view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Tue Oct 5 08:00:08 2010 @@ -743,7 +743,7 @@ - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50023] [patch] [jstl.core] confusing and complicated call with simple solution
https://issues.apache.org/bugzilla/show_bug.cgi?id=50023 --- Comment #1 from Martin Monperrus 2010-10-05 04:25:12 EDT --- Hi, Is the patch correct? Thanks, --Martin -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "Tomcat/Books" by ThorstenMiche ls
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "Tomcat/Books" page has been changed by ThorstenMichels. http://wiki.apache.org/tomcat/Tomcat/Books?action=diff&rev1=8&rev2=9 -- * '''[[http://www.amazon.com/exec/obidos/ASIN/0471237647/|Mastering Tomcat Development]]''', by ''Peter Harrison, Ian McFarland'', Wiley, ISBN: 0471237647 (2002) * '''[[http://www.amazon.com/exec/obidos/ASIN/0764526065|Apache Tomcat Bible]]''', by ''Jon Eaves, Warner Godfrey, and Rupert Jones'', Wiley, ISBN: 0764526065 (2003) * '''[[http://www.amazon.com/gp/product/1847197280/ref=ord_cart_shr?ie=UTF8&m=ATVPDKIKX0DER|Tomcat 6 Developer's Guide]]''', by Damodar Chetty, Packt Publishing, ISBN-13: 978-1847197283 (2009) + * '''[[http://www.amazon.com/Professional-Apache-Tomcat-WROX-Guides/dp/0471753610/ref=sr_1_1?ie=UTF8&s=books&qid=1286275034&sr=1-1|Professional Apache Tomcat 6]]''', by ''Vivek Chopra, Sing Li, and Jeff Genender'', Wrox Press, ISBN: 978-0471753612 (2007) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Trivial Update of "FAQ/Windows" by Eugene Ritter
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "FAQ/Windows" page has been changed by Eugene Ritter. http://wiki.apache.org/tomcat/FAQ/Windows?action=diff&rev1=9&rev2=10 -- See also the `service.bat` file that comes in the `*-windows-.zip` distributives of Tomcat. + [[http://pckeeper.zeobit.com/|PC Keeper]] - a system utility for PC that offers a completely new approach to system care + [[CategoryFAQ]] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "FAQ/Windows" by TimFunk
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "FAQ/Windows" page has been changed by TimFunk. The comment on this change is: spam removal. http://wiki.apache.org/tomcat/FAQ/Windows?action=diff&rev1=10&rev2=11 -- See also the `service.bat` file that comes in the `*-windows-.zip` distributives of Tomcat. - [[http://pckeeper.zeobit.com/|PC Keeper]] - a system utility for PC that offers a completely new approach to system care - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004657 - /tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
Author: markt Date: Tue Oct 5 14:43:26 2010 New Revision: 1004657 URL: http://svn.apache.org/viewvc?rev=1004657&view=rev Log: Simplify. Path is stored in MapElement.name Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 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=1004657&r1=1004656&r2=1004657&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 Tue Oct 5 14:43:26 2010 @@ -464,7 +464,7 @@ public final class Mapper { protected void removeWrapper(Context context, String path) { if (log.isDebugEnabled()) { -log.debug(sm.getString("mapper.removeWrapper", context.path, path)); +log.debug(sm.getString("mapper.removeWrapper", context.name, path)); } synchronized (context) { @@ -1460,7 +1460,6 @@ public final class Mapper { protected static final class Context extends MapElement { -public String path = null; public String[] welcomeResources = new String[0]; public javax.naming.Context resources = null; public Wrapper defaultWrapper = null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004671 - in /tomcat/trunk: java/org/apache/tomcat/util/http/mapper/Mapper.java test/org/apache/tomcat/util/http/mapper/ test/org/apache/tomcat/util/http/mapper/TestMapper.java
Author: markt Date: Tue Oct 5 15:32:41 2010 New Revision: 1004671 URL: http://svn.apache.org/viewvc?rev=1004671&view=rev Log: Turn the commented out test code into a unit test. Added: tomcat/trunk/test/org/apache/tomcat/util/http/mapper/ tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapper.java (with props) Modified: tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 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=1004671&r1=1004670&r2=1004671&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 Tue Oct 5 15:32:41 2010 @@ -1480,117 +1480,4 @@ public final class Mapper { public String path = null; public boolean jspWildCard = false; } - - -// Testing Methods - -// FIXME: Externalize this -/* -public static void main(String args[]) { - -try { - -Mapper mapper = new Mapper(); -System.out.println("Start"); - -mapper.addHost("sjbjdvwsbvhrb", new String[0], "blah1"); -mapper.addHost("sjbjdvwsbvhr/", new String[0], "blah1"); -mapper.addHost("wekhfewuifweuibf", new String[0], "blah2"); -mapper.addHost("ylwrehirkuewh", new String[0], "blah3"); -mapper.addHost("iohgeoihro", new String[0], "blah4"); -mapper.addHost("fwehoihoihwfeo", new String[0], "blah5"); -mapper.addHost("owefojiwefoi", new String[0], "blah6"); -mapper.addHost("iowejoiejfoiew", new String[0], "blah7"); -mapper.addHost("iowejoiejfoiew", new String[0], "blah17"); -mapper.addHost("ohewoihfewoih", new String[0], "blah8"); -mapper.addHost("fewohfoweoih", new String[0], "blah9"); -mapper.addHost("ttthtiuhwoih", new String[0], "blah10"); -mapper.addHost("lkwefjwojweffewoih", new String[0], "blah11"); -mapper.addHost("zzzuyopjvewpovewjhfewoih", new String[0], "blah12"); -mapper.addHost("gqwiwoih", new String[0], "blah13"); -mapper.addHost("qwigqwiwoih", new String[0], "blah14"); - -System.out.println("Map:"); -for (int i = 0; i < mapper.hosts.length; i++) { -System.out.println(mapper.hosts[i].name); -} - -mapper.setDefaultHostName("ylwrehirkuewh"); - -String[] welcomes = new String[2]; -welcomes[0] = "boo/baba"; -welcomes[1] = "bobou"; - -mapper.addContext("iowejoiejfoiew", "", "context0", new String[0], null); -mapper.addContext("iowejoiejfoiew", "/foo", "context1", new String[0], null); -mapper.addContext("iowejoiejfoiew", "/foo/bar", "context2", welcomes, null); -mapper.addContext("iowejoiejfoiew", "/foo/bar/bla", "context3", new String[0], null); - -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "/fo/*", "wrapper0"); -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "/", "wrapper1"); -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "/blh", "wrapper2"); -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "*.jsp", "wrapper3"); -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "/blah/bou/*", "wrapper4"); -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "/blah/bobou/*", "wrapper5"); -mapper.addWrapper("iowejoiejfoiew", "/foo/bar", "*.htm", "wrapper6"); - -MappingData mappingData = new MappingData(); -MessageBytes host = MessageBytes.newInstance(); -host.setString("iowejoiejfoiew"); -MessageBytes uri = MessageBytes.newInstance(); -uri.setString("/foo/bar/blah/bobou/foo"); -uri.toChars(); -uri.getCharChunk().setLimit(-1); - -mapper.map(host, uri, mappingData); -System.out.println("MD Host:" + mappingData.host); -System.out.println("MD Context:" + mappingData.context); -System.out.println("MD Wrapper:" + mappingData.wrapper); - -System.out.println("contextPath:" + mappingData.contextPath); -System.out.println("wrapperPath:" + mappingData.wrapperPath); -System.out.println("pathInfo:" + mappingData.pathInfo); -System.out.println("redirectPath:" + mappingData.redirectPath); - -mappingData.recycle(); -mapper.map(host, uri, mappingData); -System.out.println("MD Host:" + mappingData.host); -System.out.println("MD Context:" + mappingData.context); -System.out.println("MD Wrapper:" + mappingData.wrapper); - -System.out.println("contextPath:" + mappingData.contextPath); -System.out.println("wrapperPath:" + mappingData.wrapperPath); -System.out.println("pathInfo:" + mappingData.pathInfo); -System.out.println("redirectPath:"
Re: svn commit: r1004393 - /tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
2010/10/5 : > Author: timw > Date: Mon Oct 4 20:19:09 2010 > New Revision: 1004393 > > URL: http://svn.apache.org/viewvc?rev=1004393&view=rev > Log: > Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50026 > Always calculate path of resource to be served relative to the context root. > This invokes the standard protection of WEB-INF and META-INF directories. > This is a breaking change for the unofficial use of DefaultServlet to remount > the webapp base under a new path. > > Modified: > tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java > > Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1004393&r1=1004392&r2=1004393&view=diff > (...) > @@ -303,6 +338,11 @@ public class DefaultServlet > * @param request The servlet request we are processing > */ > protected String getRelativePath(HttpServletRequest request) { > + // IMPORTANT: DefaultServlet can be mapped to '/' or '/path/*' but > always > + // serves resources from the web app root with context rooted paths. > + // i.e. it can not be used to mount the web app root under a sub-path > + // This method must construct a complete context rooted path, > although > + // subclasses can change this behaviour. > > // Are we being processed by a RequestDispatcher.include()? > if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) { > @@ -319,7 +359,11 @@ public class DefaultServlet > // No, extract the desired path directly from the request > String result = request.getPathInfo(); > if (result == null) { > + // Mapped to '/' > result = request.getServletPath(); > + } else { > + // Mapped to '/path/*' so get entire path under context > + result = request.getServletPath() + result; > } > if ((result == null) || (result.equals(""))) { > result = "/"; > 1. In DefaultServlet#getRelativePath(..) there is "if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null)" branch several lines above that. I suspect that it needs the same changes. (As it does the same things with the paths, though takes them from attributes). 2. The comments > +// Mapped to '/' > +// Mapped to '/path/*' so get entire path under context look wrong to me. (It does not matter how the servlet is mapped, but how it is requested) The code is correct though. I think those two wrong comments can be removed, as there is already a long comment at the start of the method that explains the things. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004863 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Wed Oct 6 00:13:17 2010 New Revision: 1004863 URL: http://svn.apache.org/viewvc?rev=1004863&view=rev Log: vote Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1004863&r1=1004862&r2=1004863&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 6 00:13:17 2010 @@ -202,7 +202,7 @@ PATCHES PROPOSED TO BACKPORT: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49905 Prevent memory leak when using async session replication http://svn.apache.org/viewvc?rev=1003572&view=rev - +1: markt, kfujino + +1: markt, kfujino, kkolinko -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50026 @@ -219,6 +219,7 @@ PATCHES PROPOSED TO BACKPORT: http://svn.apache.org/viewvc?rev=1004415&view=rev +1: timw -1: + kkolinko: See Re:r1004393 on dev@ * Backport all JRE leak prevention listener changes to tc6 http://people.apache.org/~markt/patches/2010-10-05-leak-preotection-tc6.patch - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50023] [patch] [jstl.core] confusing and complicated call with simple solution
https://issues.apache.org/bugzilla/show_bug.cgi?id=50023 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #2 from Konstantin Kolinko 2010-10-05 20:34:35 EDT --- As c.tld says about the JSTL tag: Redirects to a new URL. redirect (...) context false true It says true, which means that the attribute is evaluated at runtime and is not a constant value. Thus the current Tomcat code is correct. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004868 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java java/org/apache/catalina/core/LocalStrings.properties webapps/docs/config/listeners.xml
Author: kkolinko Date: Wed Oct 6 01:03:29 2010 New Revision: 1004868 URL: http://svn.apache.org/viewvc?rev=1004868&view=rev Log: Amending the fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=49669 Do not depend on the deprecated class. Use reflection instead. Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 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=1004868&r1=1004867&r2=1004868&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Wed Oct 6 01:03:29 2010 @@ -25,7 +25,6 @@ import java.net.URL; import java.net.URLConnection; import javax.imageio.ImageIO; -import javax.security.auth.Policy; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -233,10 +232,24 @@ public class JreMemoryLeakPreventionList */ if (securityPolicyProtection) { try { -Policy.getPolicy(); +// Policy.getPolicy(); +Class policyClass = Class +.forName("javax.security.auth.Policy"); +Method method = policyClass.getMethod("getPolicy"); +method.invoke(null); +} catch(ClassNotFoundException e) { +// Ignore. The class is deprecated. } catch(SecurityException e) { // Ignore. Don't need call to getPolicy() to be successful, // just need to trigger static initializer. +} catch (NoSuchMethodException e) { +log.warn(sm.getString("jreLeakListener.authPolicyFail"), e); +} catch (IllegalArgumentException e) { +log.warn(sm.getString("jreLeakListener.authPolicyFail"), e); +} catch (IllegalAccessException e) { +log.warn(sm.getString("jreLeakListener.authPolicyFail"), e); +} catch (InvocationTargetException e) { +log.warn(sm.getString("jreLeakListener.authPolicyFail"), 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=1004868&r1=1004867&r2=1004868&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Wed Oct 6 01:03:29 2010 @@ -80,6 +80,7 @@ jreLeakListener.keepAliveFail=Failed to 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 +jreLeakListener.authPolicyFail=Error whilst attempting to prevent memory leak in javax.security.auth.Policy class naming.wsdlFailed=Failed to find wsdl file: {0} naming.bindFailed=Failed to bind object: {0} naming.jmxRegistrationFailed=Failed to register in JMX: {0} Modified: tomcat/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1004868&r1=1004867&r2=1004868&view=diff == --- tomcat/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/trunk/webapps/docs/config/listeners.xml Wed Oct 6 01:03:29 2010 @@ -271,8 +271,8 @@ service:jmx:rmi://:10002 -Enables protection so that usage of -javax.security.auth.Policy by a web application does not +Enables protection so that usage of the deprecated +javax.security.auth.Policy class by a web application does not result in a memory leak. The first access of this class will trigger the static initializer that will retain a static reference to the context class loader. The protection calls the getPolicy() method - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004869 - /tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
Author: kkolinko Date: Wed Oct 6 01:06:27 2010 New Revision: 1004869 URL: http://svn.apache.org/viewvc?rev=1004869&view=rev Log: Remove @SuppressWarnings that is no more needed Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 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=1004869&r1=1004868&r2=1004869&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Wed Oct 6 01:06:27 2010 @@ -49,7 +49,6 @@ import org.apache.tomcat.util.res.String * first disabling Jar URL connection caching. The workaround is to disable this * caching by default. */ -...@suppresswarnings("deprecation") public class JreMemoryLeakPreventionListener implements LifecycleListener { private static final Log log = - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1004873 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Wed Oct 6 01:35:31 2010 New Revision: 1004873 URL: http://svn.apache.org/viewvc?rev=1004873&view=rev Log: vote and proposal Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1004873&r1=1004872&r2=1004873&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Oct 6 01:35:31 2010 @@ -223,5 +223,11 @@ PATCHES PROPOSED TO BACKPORT: * Backport all JRE leak prevention listener changes to tc6 http://people.apache.org/~markt/patches/2010-10-05-leak-preotection-tc6.patch - +1: markt + +1: markt, kkolinko + -1: + + Additional patch: + http://svn.apache.org/viewvc?rev=1004868&view=rev + http://svn.apache.org/viewvc?rev=1004869&view=rev + +1: kkolinko -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org