open static fun locateMBeanServer(): MBeanServer
Attempt to find a locally running MBeanServer. Fails if no MBeanServer can be found. Logs a warning if more than one MBeanServer found, returning the first one from the list.
org.springframework.jmx.MBeanServerNotFoundException - if no MBeanServer could be found
Return
the MBeanServer if found
See Also
javax.management.MBeanServerFactory#findMBeanServer
open static fun locateMBeanServer(@Nullable agentId: String): MBeanServer
Attempt to find a locally running MBeanServer. Fails if no MBeanServer can be found. Logs a warning if more than one MBeanServer found, returning the first one from the list.
agentId - the agent identifier of the MBeanServer to retrieve. If this parameter is null, all registered MBeanServers are considered. If the empty String is given, the platform MBeanServer will be returned.
org.springframework.jmx.MBeanServerNotFoundException - if no MBeanServer could be found
Return
the MBeanServer if found
See Also
javax.management.MBeanServerFactory#findMBeanServer(String)