FAQ
Author: markt
Date: Wed Oct 29 19:40:24 2014
New Revision: 1635276

URL: http://svn.apache.org/r1635276
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
     tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
     tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java
     tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
     tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
     tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java Wed Oct 29 19:40:24 2014
@@ -42,10 +42,10 @@ public class TestVirtualWebappLoader ext
      @Test
      public void testStartInternal() throws Exception {
          Tomcat tomcat = getTomcatInstance();
+
          File appDir = new File("test/webapp");
- // Must have a real docBase - just use temp
- StandardContext ctx =
- (StandardContext)tomcat.addContext("", appDir.getAbsolutePath());
+ StandardContext ctx = (StandardContext) tomcat.addContext("",
+ appDir.getAbsolutePath());


          WebappLoader loader = new WebappLoader();

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoader.java Wed Oct 29 19:40:24 2014
@@ -39,7 +39,7 @@ public class TestWebappClassLoader exten
          expected[1] = "jar:" + warUrl + "!/WEB-INF/lib/test.jar";

          Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
+
          StandardContext ctx =
                  (StandardContext)tomcat.addContext("", f.getAbsolutePath());


Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java Wed Oct 29 19:40:24 2014
@@ -41,9 +41,8 @@ public class TestWebappClassLoaderExecut
      public void testTimerThreadLeak() throws Exception {
          Tomcat tomcat = getTomcatInstance();

- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          if (ctx instanceof StandardContext) {
              ((StandardContext) ctx).setClearReferencesStopThreads(true);

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java Wed Oct 29 19:40:24 2014
@@ -40,9 +40,8 @@ public class TestWebappClassLoaderMemory
      public void testTimerThreadLeak() throws Exception {
          Tomcat tomcat = getTomcatInstance();

- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          if (ctx instanceof StandardContext) {
              ((StandardContext) ctx).setClearReferencesStopTimerThreads(true);

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java?rev=1635276&r1=1635275&r2=1635276&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java Wed Oct 29 19:40:24 2014
@@ -45,9 +45,8 @@ public class TestWebappClassLoaderThread
          tomcat.getServer().addLifecycleListener(
                  new JreMemoryLeakPreventionListener());

- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          Tomcat.addServlet(ctx, "leakServlet1",
                  "org.apache.tomcat.unittest.TesterLeakingServlet1");
@@ -100,9 +99,8 @@ public class TestWebappClassLoaderThread
          tomcat.getServer().addLifecycleListener(
                  new JreMemoryLeakPreventionListener());

- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          Tomcat.addServlet(ctx, "leakServlet2",
                  "org.apache.tomcat.unittest.TesterLeakingServlet2");



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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupdev @
categoriestomcat
postedOct 29, '14 at 7:41p
activeOct 29, '14 at 7:41p
posts1
users1
websitetomcat.apache.org
irc#tomcat

1 user in discussion

Markt: 1 post

People

Translate

site design / logo © 2017 Grokbase