On 03.02.2012 13:44, Konstantin Kolinko wrote:
2012/2/3 Mark Thomas<ma...@apache.org>:
On 03/02/2012 12:19, Konstantin Kolinko wrote:
2012/2/3<ma...@apache.org>:
+ @Override
+ public String getMBeanKeyProperties() {
+ Container c = this;
+ StringBuilder keyProperties = new StringBuilder();
+ int containerCount = 0;
+
+ // Work up container hierarchy, add a component to the name for
+ // each container
+ while (!(c instanceof Engine)) {
+ if (c instanceof Wrapper) {
+ keyProperties.append(",servlet=");
+ keyProperties.append(c.getName());
I think that the names should be wrapped by ObjectName.quote().
Here and in similar method implemented in another class below.
I do not think that there is a restriction that forbids ,;:= in a servlet name.
That is going to change the name Servlets are registered under. That
sort of change has caused problems for folks in the past. I recall
someone (rjung?) fixed a similar issue in the connectors but I can't
remember where or how off-hand.
Connectors use address in their names.
The problem was that if address is IP6 IP that has ':'s then it cannot
be used unquoted. That is why ObjectName.quote() was needed there.
-> MBeanUtils#createObjectName(String domain,
Connector connector)
A recent bug with connector names was with a change that removed
quotes to use better connector names in log messages and as thread
names. Quotes are needed in JMX names only, but not in human-readable
names such as Container.getName(). So there was some work to separate
the two usages. (That is what I remember. I might be a bit biased
though).
Javadoc for Container.getName() says that that name is for humans. It
says nothing about it being suitable for JMX.
That's a better description of what happened than what I remembered. Thanks.
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org