[
https://jira.jboss.org/jira/browse/JBAS-7785?page=com.atlassian.jira.plug...
]
Brian Stansberry updated JBAS-7785:
-----------------------------------
Issue Type: Bug (was: Task)
Environment: JDK 5; doesn't appear with JDK 6
Description:
On JDK 5, when JBossManager attempts to register an mbean for itself when it's the
manager for a root context (i.e. one who's path is "") it fails with
javax.management.MalformedObjectNameException: Unterminated key property part.
It doesn't fail on JDK 6; see the forum thread.
Problem is the ObjectName construction logic is failing to deal with the empty path:
ObjectName clusterName = new ObjectName(domain
+ ":type=Manager,host=" + hostName + ",path="
+ ((Context) container_).getPath());
Fix is:
String path = ((Context) container_).getPath();
path = "".equals(path) ? "/" : path;
ObjectName clusterName = new ObjectName(domain
+ ":type=Manager,host=" + hostName + ",path="
+ path);
Using / as the path is consistent with how StandardContext creates an ObjectName for
itself.
This bug ObjectName results in an ERROR in the server log and the mbean for the session
manager not being registered, but it doesn't prevent normal operation of the session
manager.
was:When JBossManager attempts to register an mbean for itself when it's the manager
for a root context (i.e. one who's path is "") it uses the empty string as
the value of the "path" attribute, rather than the "/" used by
StandardContext. Follow the StandardContext pattern.
Priority: Major (was: Optional)
JBossManager should follow StandardContext's naming convention
for mbean for root context
-----------------------------------------------------------------------------------------
Key: JBAS-7785
URL:
https://jira.jboss.org/jira/browse/JBAS-7785
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Clustering
Affects Versions: JBossAS-5.1.0.GA, JBossAS-6.0.0.M1, JBossAS-6.0.0.M2
Environment: JDK 5; doesn't appear with JDK 6
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-6.0.0.M3
On JDK 5, when JBossManager attempts to register an mbean for itself when it's the
manager for a root context (i.e. one who's path is "") it fails with
javax.management.MalformedObjectNameException: Unterminated key property part.
It doesn't fail on JDK 6; see the forum thread.
Problem is the ObjectName construction logic is failing to deal with the empty path:
ObjectName clusterName = new ObjectName(domain
+ ":type=Manager,host=" + hostName + ",path="
+ ((Context) container_).getPath());
Fix is:
String path = ((Context) container_).getPath();
path = "".equals(path) ? "/" : path;
ObjectName clusterName = new ObjectName(domain
+ ":type=Manager,host=" + hostName + ",path="
+ path);
Using / as the path is consistent with how StandardContext creates an ObjectName for
itself.
This bug ObjectName results in an ERROR in the server log and the mbean for the session
manager not being registered, but it doesn't prevent normal operation of the session
manager.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira