| |
|
| java.lang.Object org.jboss.mx.util.MBeanServerLocator
MBeanServerLocator | public class MBeanServerLocator (Code) | | A helper class to locate an MBeanServer.
MBeanServer lookup strategy enhanced to allow the explicit
setting of a particular instance to be returned. This is needed to
allow re-using the jdk5 ManagementFactory.getPlatformMBeanServer()
as our main MBeanServer. The DefaultDomain name of this server cannot
be set, and it seems to be "null" by default (probably a bug).
author: Jason Dillon author: Scott.Stark@jboss.org author: Dimitris Andreadis version: $Revision: 57200 $ |
locate | public static MBeanServer locate(String agentID)(Code) | | Returns the first MBeanServer registered under the agentID
Parameters: agentID - the id of the MBeanServer to look for the first MBeanServer with an agentID |
locate | public static MBeanServer locate()(Code) | | Returns the first available MBeanServer
the first available MBeanServer |
locateJBoss | public static MBeanServer locateJBoss()(Code) | | Returns the main jboss MBeanServer.
If there is one set using setJBoss(), it will be returned.
Otherwise the strategy is to return the first MBeanServer
registered under the "jboss" id (or else, default domain name)
the main jboss MBeanServer throws: IllegalStateException - when no MBeanServer can be found |
setJBoss | public static void setJBoss(MBeanServer server)(Code) | | Optionally set the MBeanServer to be returned
by calls to locateJBoss(). Setting this back
to null reverts to the normal lookup strategy.
Parameters: server - the main jboss MBeanServer or null |
|
|
|