1. JavaDoc for the method has to be updated. It still says that the
name is quoted.

2. If I understand correctly, the name _is_ used directly, in
AbstractConnectionHandler.register():
... ",worker=" + getProtocol().getName() + ",name=" ...

and MBeanUtils.destroyMBean(Connector,Service)
  worker = ((**Protocol)*).getName()
  new ObjectName(domain + ":type=RequestProcessor,worker=" + worker + ",*")


So if quotes are to be removed, let's do before appending the "-exec-"
suffix to them.
The name is passed to Endpoint (AbstractEndpoint.setName()) and the
"-exec-" suffix is added in AbstractEndpoint.createExecutor().  There
are also other suffixes elsewhere ("-Poller-", "-CometPoller-"), ...


2011/6/13  <rj...@apache.org>:
> Author: rjung
> Date: Mon Jun 13 11:19:23 2011
> New Revision: 1135088
>
> URL: http://svn.apache.org/viewvc?rev=1135088&view=rev
> Log:
> Remove superfluous quotes from thread names for
> connection pools.
>
> Example broken thread name: "http-apr-8001"-exec-2
> (including leading and intermediate quotes).
>
> Since we never use the names as a full ObjectName,
> only as a part of an ObjectName, it is safe to
> remove the surrounding quotes from the Protocol name.
>
> Modified:
>    tomcat/trunk/java/org/apache/coyote/AbstractProtocol.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=1135088&r1=1135087&r2=1135088&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Mon Jun 13 
> 11:19:23 2011
> @@ -229,7 +229,8 @@ public abstract class AbstractProtocol i
>             name.append('-');
>         }
>         name.append(endpoint.getPort());
> -        return ObjectName.quote(name.toString());
> +        String quotedName = ObjectName.quote(name.toString());
> +        return quotedName.substring(1, quotedName.length()-1);
>     }
>
>
>
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1135088&r1=1135087&r2=1135088&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Mon Jun 13 11:19:23 2011
> @@ -53,6 +53,10 @@
>         Fix unit test for bindOnInit which was failing for APR on some
>         platforms. (rjung)
>       </fix>
> +      <fix>
> +        Remove superfluous quotes from thread names for connection pools.
> +        (rjung)
> +      </fix>
>     </changelog>
>   </subsection>
>   <subsection name="Cluster">
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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

Reply via email to