You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/07/01 20:06:47 UTC

svn commit: r959736 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

Author: markt
Date: Thu Jul  1 18:06:47 2010
New Revision: 959736

URL: http://svn.apache.org/viewvc?rev=959736&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49522
Just use host and path in NamingResources MBean name rather than full Context MBean name

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=959736&r1=959735&r2=959736&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Jul  1 18:06:47 2010
@@ -1755,7 +1755,7 @@ public class StandardContext extends Con
         
         unregister(onameNamingResoucres);
         onameNamingResoucres = register(namingResources,
-                "type=NamingResources," + getObjectNameKeyProperties());
+                "type=NamingResources," + getObjectKeyPropertiesNameOnly());
     }
 
 
@@ -5546,30 +5546,34 @@ public class StandardContext extends Con
     protected String getObjectNameKeyProperties() {
 
         StringBuilder keyProperties =
-            new StringBuilder("j2eeType=WebModule,name=");
-        
-        String hostName = getParent().getName();
-        if (hostName == null) {
-            keyProperties.append("DEFAULT");
+            new StringBuilder("j2eeType=WebModule,");
+        keyProperties.append(getObjectKeyPropertiesNameOnly());
+        keyProperties.append(",J2EEApplication=");
+        keyProperties.append(getJ2EEApplication());
+        keyProperties.append(",J2EEServer=");
+        keyProperties.append(getJ2EEServer());
+
+        return keyProperties.toString();
+    }
+    
+    private String getObjectKeyPropertiesNameOnly() {
+        StringBuilder result = new StringBuilder("name=");
+        String hostname = getParent().getName();
+        if (hostname == null) {
+            result.append("DEFAULT");
         } else {
-            keyProperties.append(hostName);
+            result.append(hostname);
         }
         
         String pathName = getName();
         if ("".equals(pathName)) {
-            keyProperties.append('/');
+            result.append('/');
         } else {
-            keyProperties.append(pathName);
+            result.append(pathName);
         }
 
-        keyProperties.append(",J2EEApplication=");
-        keyProperties.append(getJ2EEApplication());
-        keyProperties.append(",J2EEServer=");
-        keyProperties.append(getJ2EEServer());
-
-        return keyProperties.toString();
+        return result.toString();
     }
-    
 
     @Override
     protected void initInternal() throws LifecycleException {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=959736&r1=959735&r2=959736&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jul  1 18:06:47 2010
@@ -149,6 +149,11 @@
       <fix>
         <bug>49518</bug>: Fix typo in extras documentation. (markt)
       </fix>
+      <fix>
+        <bug>49522</bug>: Fix regression due to change of name for MBeans for
+        naming resources that broke the complete server status page in the
+        manager application. Note these MBeans now have a new name. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>



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


Re: svn commit: r959736 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

Posted by Mark Thomas <ma...@apache.org>.
On 01/07/2010 21:27, Caldarale, Charles R wrote:
>> From: markt@apache.org [mailto:markt@apache.org]
>> Subject: svn commit: r959736 - in /tomcat/trunk:
>> java/org/apache/catalina/core/StandardContext.java
>> webapps/docs/changelog.xml
>>
>>           unregister(onameNamingResoucres);
>>           onameNamingResoucres = register(namingResources,
>
> Just curious: how did someone come up with the variable name "onameNamingResou*cr*es"?  And does anyone want to correct the original typo?

Probably me and my poor typing. I'll fix the typo.

Mark



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


RE: svn commit: r959736 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: markt@apache.org [mailto:markt@apache.org]
> Subject: svn commit: r959736 - in /tomcat/trunk:
> java/org/apache/catalina/core/StandardContext.java
> webapps/docs/changelog.xml
> 
>          unregister(onameNamingResoucres);
>          onameNamingResoucres = register(namingResources,

Just curious: how did someone come up with the variable name "onameNamingResou*cr*es"?  And does anyone want to correct the original typo?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.