tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1144785 - in /tomcat/trunk: java/org/apache/coyote/AbstractProtocol.java test/org/apache/catalina/mbeans/TestRegistration.java webapps/docs/changelog.xml
Date Sun, 10 Jul 2011 06:53:36 GMT
Author: rjung
Date: Sun Jul 10 06:53:36 2011
New Revision: 1144785

URL: http://svn.apache.org/viewvc?rev=1144785&view=rev
Log:
Fix regression producing invalid MBean names when using IPV6
addresses for connectors.

- revert r1135088

- remove the surrounding quotes only when
  passing the name to the endpoint, so they
  don't end up in the middle of thread names.
  The thread names are used as MBean attribute
  values, but not in MBean names.

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
    tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1144785&r1=1144784&r2=1144785&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Sun Jul 10 06:53:36 2011
@@ -233,8 +233,7 @@ public abstract class AbstractProtocol i
             name.append('-');
         }
         name.append(endpoint.getPort());
-        String quotedName = ObjectName.quote(name.toString());
-        return quotedName.substring(1, quotedName.length()-1);
+        return ObjectName.quote(name.toString());
     }
 
     
@@ -363,7 +362,8 @@ public abstract class AbstractProtocol i
                     getHandler().getGlobal(), rgOname, null );
         }
 
-        endpoint.setName(getName());
+        String endpointName = getName();
+        endpoint.setName(endpointName.substring(1, endpointName.length()-1));
 
         try {
             endpoint.init();

Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=1144785&r1=1144784&r2=1144785&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java (original)
+++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Sun Jul 10 06:53:36
2011
@@ -80,10 +80,10 @@ public class TestRegistration extends To
     private static String[] connectorMBeanNames(String port, String type) {
         return new String[] {
         "Tomcat:type=Connector,port=" + port,
-        "Tomcat:type=GlobalRequestProcessor,name=http-" + type + "-" + port,
+        "Tomcat:type=GlobalRequestProcessor,name=\"http-" + type + "-" + port + "\"",
         "Tomcat:type=Mapper,port=" + port,
         "Tomcat:type=ProtocolHandler,port=" + port,
-        "Tomcat:type=ThreadPool,name=http-" + type + "-" + port,
+        "Tomcat:type=ThreadPool,name=\"http-" + type + "-" + port + "\"",
         };
     }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144785&r1=1144784&r2=1144785&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 06:53:36 2011
@@ -64,6 +64,10 @@
         Correct regression introduced in 7.0.17 that triggered 400 entries in
         the AccessLog when using the AJP/BIO connector. (markt)
       </fix>
+      <fix>
+        Fix regression producing invalid MBean names when using IPV6
+        addresses for connectors. (rjung)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">



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


Mime
View raw message