Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 33445 invoked from network); 1 Jul 2010 18:07:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Jul 2010 18:07:45 -0000 Received: (qmail 64913 invoked by uid 500); 1 Jul 2010 18:07:44 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 64755 invoked by uid 500); 1 Jul 2010 18:07:43 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 64746 invoked by uid 99); 1 Jul 2010 18:07:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jul 2010 18:07:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jul 2010 18:07:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B05262388993; Thu, 1 Jul 2010 18:06:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r959736 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml Date: Thu, 01 Jul 2010 18:06:47 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100701180647.B05262388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 @@ 49518: Fix typo in extras documentation. (markt) + + 49522: 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) + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org