Parallel deployment
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 5 Nov 2010 18:17:56 +0000 (18:17 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 5 Nov 2010 18:17:56 +0000 (18:17 +0000)
Additional Context.get[Name|Path]() clean up

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1031690 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/ApplicationContext.java
java/org/apache/catalina/mbeans/MBeanUtils.java

index 12994b2..33a8a67 100644 (file)
@@ -533,7 +533,7 @@ public class ApplicationContext
 
         DirContext resources = context.getResources();
         if (resources != null) {
-            String fullPath = context.getName() + normPath;
+            String fullPath = context.getPath() + normPath;
             String hostName = context.getParent().getName();
             try {
                 resources.lookup(path);
index 9388506..90de3f3 100644 (file)
@@ -1699,11 +1699,11 @@ public class MBeanUtils {
                 keyProperties.append(",servlet=");
                 keyProperties.append(c.getName());
             } else if (c instanceof Context) {
-                String contextName = ((Context)container).getName();
+                keyProperties.append(",context=");
+                String contextName = c.getName();
                 if (!contextName.startsWith("/")) {
-                    contextName = "/" + contextName;
+                    keyProperties.append('/');
                 }
-                keyProperties.append(",context=");
                 keyProperties.append(contextName);
             } else if (c instanceof Host) {
                 keyProperties.append(",host=");