[jboss-jira] [JBoss JIRA] Created: (JBAS-7785) JBossManager cannot register mbean for root context

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Thu Mar 4 12:25:10 EST 2010


JBossManager cannot register 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-6.0.0.M2, JBossAS-6.0.0.M1, JBossAS-5.1.0.GA
            Reporter: Brian Stansberry
            Assignee: Brian Stansberry
             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 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.

-- 
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

        



More information about the jboss-jira mailing list