[
https://jira.jboss.org/jira/browse/JBAS-7785?page=com.atlassian.jira.plug...
]
Brian Stansberry updated JBAS-7785:
-----------------------------------
Summary: JBossManager should follow StandardContext's naming
convention for mbean for root context (was: JBossManager cannot register mbean for root
context)
Issue Type: Task (was: Bug)
JBoss Forum Reference: (was:
http://community.jboss.org/thread/148951?tstart=0)
Description: 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. (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 fails with
javax.management.MalformedObjectNameException: Unterminated key property part.
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.)
Priority: Optional (was: Major)
Originally I thought this was a bug leading to errors in the logs and the mbean not
getting registered, but that's not correct; it's just an inconsistency in how the
ObjectNames are formed.
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: Task
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
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Optional
Fix For: JBossAS-6.0.0.M3
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.
--
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