Author: kkolinko
Date: Fri Jul  1 20:20:33 2011
New Revision: 1142068

URL: http://svn.apache.org/viewvc?rev=1142068&view=rev
Log:
In Tomcat.initBaseDir():
set a value for catalina.home only if it has not been set previously.

Without this fix, I guess, you won't be able to run embedded Tomcat with
separate catalina.base and catalina.home.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1142068&r1=1142067&r2=1142068&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Fri Jul  1 
20:20:33 2011
@@ -613,11 +613,12 @@ public class Tomcat {
     }
     
     protected void initBaseDir() {
+        String catalinaHome = System.getProperty(Globals.CATALINA_HOME_PROP);
         if (basedir == null) {
             basedir = System.getProperty(Globals.CATALINA_BASE_PROP);
         }
         if (basedir == null) {
-            basedir = System.getProperty(Globals.CATALINA_HOME_PROP);
+            basedir = catalinaHome;
         }
         if (basedir == null) {
             // Create a temp dir.
@@ -633,7 +634,9 @@ public class Tomcat {
                 }
             }
         }
-        System.setProperty(Globals.CATALINA_HOME_PROP, basedir);
+        if (catalinaHome == null) {
+            System.setProperty(Globals.CATALINA_HOME_PROP, basedir);
+        }
         System.setProperty(Globals.CATALINA_BASE_PROP, basedir);
     }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1142068&r1=1142067&r2=1142068&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul  1 20:20:33 2011
@@ -190,6 +190,10 @@
         Prevent possible NPE when serving Servlets that implement the
         SingleThreadModel interface. (markt)
       </fix>
+      <fix>
+        In launcher for embedded Tomcat: do not change 
<code>catalina.home</code>
+        system property if it had a value. (kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">
@@ -235,7 +239,7 @@
       <fix>
         <bug>36362</bug>: Handle the case where tag file attributes (which can
         use any valid XML name) have a name which is not a Java identifier.
-        (markt)
+        (markt/kkolinko)
       </fix>
       <add>
         Broaden the exception handling in the EL Parser so that more failures 
to



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

Reply via email to