Class JmxmpServer
- java.lang.Object
-
- com.tangosol.net.management.JmxmpServer
-
- All Implemented Interfaces:
MBeanServerFinder
public class JmxmpServer extends Object implements MBeanServerFinder
An implementation of a CoherenceMBeanServerFinder
that creates aJMXConnectorServer
server that uses JMXMP as its transport rather than RMI. This allows JMX to be visible from inside a container that uses NAT'ing.The JMXMP server can be enabled by setting the
coherence.management.serverfactory
system property to the fully qualified name of this class, or by specifically configuring it in the management section of the operational configuration file.- Since:
- 22.06
- Author:
- Jonathan Knight 2022.04.22
-
-
Constructor Summary
Constructors Constructor Description JmxmpServer()
Create aJmxmpServer
that binds to the any local address.JmxmpServer(String address)
Create aJmxmpServer
that binds to the specified address.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JMXServiceURL
findJMXServiceUrl(String s)
Find the JMXServiceURL for the MBeanConnector used by the Coherence JMX framework.MBeanServer
findMBeanServer(String s)
Find an MBeanServer that should be used by the Coherence JMX framework to register new or locate existing MBeans.
-
-
-
Constructor Detail
-
JmxmpServer
public JmxmpServer()
Create aJmxmpServer
that binds to the any local address.
-
JmxmpServer
public JmxmpServer(String address)
Create aJmxmpServer
that binds to the specified address.- Parameters:
address
- the address to listen on
-
-
Method Detail
-
findMBeanServer
public MBeanServer findMBeanServer(String s)
Description copied from interface:MBeanServerFinder
Find an MBeanServer that should be used by the Coherence JMX framework to register new or locate existing MBeans.Under some circumstances, there could exist more than one MBeanServer and the default domain name parameter is used to identify which MBeanServer should be returned by this method.
When standard Coherence MBeans are need to be registered with an MBeanServer, this method is passed the value of the "management-config/default-domain-name" element in the operational configuration descriptor (empty string by default). When a platform or custom MBeans are to be queried using the "mbean/mbean-query" configuration element, the value of the "mbean/mbean-server-domain" element is passed as this parameter.
Note: Returning null will result in Coherence using the standard MBeanServer discovery algorithm (see
MBeanHelper.findMBeanServer(String)
).- Specified by:
findMBeanServer
in interfaceMBeanServerFinder
- Parameters:
s
- the default domain name; empty string indicates that the caller does not have any preferences and MBeanServerFinder could return any MBeanServer it deems fit- Returns:
- an existing or new MBeanServer with the specified default domain name (if specified) or null
-
findJMXServiceUrl
public JMXServiceURL findJMXServiceUrl(String s)
Description copied from interface:MBeanServerFinder
Find the JMXServiceURL for the MBeanConnector used by the Coherence JMX framework.When "management-config/managed-nodes" value is set to "dynamic" and a Coherence node is elected to be a management node, then it calls this method to find out if there is an existing MBean Connector running that can be used to access the MBeanServer on the node. It publishes this JMXServiceURL thru the Coherence NamingService.
If there is no existing MBeanConnector running, then a new Connector is started and its JMXServiceURL is published in the NamingService.
- Specified by:
findJMXServiceUrl
in interfaceMBeanServerFinder
- Parameters:
s
- the default domain name; empty string indicates that the caller does not have any preferences and MBeanServerFinder could return any JMXServiceURL it deems fit- Returns:
- JMXServiceURL for the MBeanConnector or null if no MBean Connector running.
-
-