tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1445062 - in /tomcat/trunk/java/org/apache/catalina/storeconfig: StoreContextAppender.java server-registry.xml
Date Tue, 12 Feb 2013 08:53:40 GMT
Author: kfujino
Date: Tue Feb 12 08:53:40 2013
New Revision: 1445062

URL: http://svn.apache.org/r1445062
Log:
Improve support for Parallel deployment.

Modified:
    tomcat/trunk/java/org/apache/catalina/storeconfig/StoreContextAppender.java
    tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/StoreContextAppender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/StoreContextAppender.java?rev=1445062&r1=1445061&r2=1445062&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/storeconfig/StoreContextAppender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/StoreContextAppender.java Tue Feb 12
08:53:40 2013
@@ -128,19 +128,23 @@ public class StoreContextAppender extend
      */
     protected String getDefaultWorkDir(StandardContext context) {
         String defaultWorkDir = null;
-        String contextPath = context.getPath().length() == 0 ? "_" : context
-                .getPath().substring(1);
+        String contextWorkDir = context.getName();
+        if (contextWorkDir.length() == 0)
+            contextWorkDir = "_";
+        if (contextWorkDir.startsWith("/"))
+            contextWorkDir = contextWorkDir.substring(1);
+
         Container host = context.getParent();
         if (host instanceof StandardHost) {
             String hostWorkDir = ((StandardHost) host).getWorkDir();
             if (hostWorkDir != null) {
-                defaultWorkDir = hostWorkDir + File.separator + contextPath;
+                defaultWorkDir = hostWorkDir + File.separator + contextWorkDir;
             } else {
                 String engineName = context.getParent().getParent().getName();
                 String hostName = context.getParent().getName();
                 defaultWorkDir = "work" + File.separator + engineName
                         + File.separator + hostName + File.separator
-                        + contextPath;
+                        + contextWorkDir;
             }
         }
         return defaultWorkDir;

Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml?rev=1445062&r1=1445061&r2=1445062&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml (original)
+++ tomcat/trunk/java/org/apache/catalina/storeconfig/server-registry.xml Tue Feb 12 08:53:40
2013
@@ -78,6 +78,7 @@
         <TransientAttribute>tldScanTime</TransientAttribute>
         <TransientAttribute>effectiveMajorVersion</TransientAttribute>
         <TransientAttribute>effectiveMinorVersion</TransientAttribute>
+        <TransientAttribute>webappVersion</TransientAttribute>
      </Description>
      <Description
         id="org.apache.catalina.deploy.NamingResources.[GlobalNamingResources]"



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


Mime
View raw message