...
To enable this feature following two properties should be uncommented from the carbon.xml
:
Code Block |
---|
<Ports>
<!-- The JMX Ports -->
<JMX>
<!--The port RMI registry is exposed-->
<!--<RMIRegistryPort>9999</RMIRegistryPort>-->
<!--The port RMI server should be exposed-->
<!--<RMIServerPort>11111</RMIServerPort>-->
</JMX>
</Ports>
|
...
The following code fragment is from CarbonServerManager.java which shows how the JMX URL is constructed according to provided port.
Code Block |
---|
// Create an RMI connector and start it
if (rmiServerPortString != null) {
int rmiServerPort = Integer.parseInt(rmiServerPortString);
jmxURL = "service:jmx:rmi://" + NetworkUtils.getLocalHostname() + ":" +
rmiServerPort + "/jndi/rmi://" + NetworkUtils.getLocalHostname() + ":" +
rmiRegistryPort + "/jmxrmi";
} else {
jmxURL = "service:jmx:rmi:///jndi/rmi://" +
NetworkUtils.getLocalHostname() + ":" + rmiRegistryPort + "/jmxrmi";
}
JMXServiceURL url = new JMXServiceURL(jmxURL);
|
With this improvment you will be able to monitor Governance Registry using a JMX client which is behind a firewall.
Excerpt | ||
---|---|---|
| ||
Instructions on how to monitor Governance Registry using a remote JMX client. |