17
17
<!-- Use the jdk 1.5 platformMBeanServer -->
18
18
<Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/>
20
<!-- Use an mx4j mbean server - use this if running with jdk<1.5
20
<!-- Use an mx4j mbean server - use this if running with jdk<1.5
21
21
<Call id="MBeanServer" class="javax.management.MBeanServerFactory" name="createMBeanServer"/>
24
24
<!-- =========================================================== -->
25
25
<!-- Initialize the Jetty MBean container -->
26
26
<!-- =========================================================== -->
40
<!-- optionally add a remote JMX connector
41
<Call id="jmxConnector" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
41
When setting up the JMXConnectorServer via RMI, two TCP ports are used to communicate with
43
* the rmiregistry port (by default 1099) from where the RMI stub is downloaded
44
* the rmi server port (by default randomly chosen) where the actual RMI communication happens
45
The JMXServiceURL for the default configuration is therefore:
47
service:jmx:rmi:///jndi/rmi://<remotehost>:1099/jmxrmi
49
In case a firewall is restricting port access, you need to make sure that the rmi server port
50
is not chosen randomly, and this can be specified with the following JMXServiceURL:
52
service:jmx:rmi://<host>:2100/jndi/rmi://<host>:2099/jmxrmi
54
where 2099 is the rmiregistry port and 2100 is the rmi server port.
55
Make sure the firewall allow access to those ports.
57
When using the XML configuration below, you don't need to specify any of the JMX system properties
58
on the command line (see http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html).
61
<!-- Setup the RMIRegistry on a specific port
62
<Call id="rmiRegistry" class="java.rmi.registry.LocateRegistry" name="createRegistry">
63
<Arg type="int">2099</Arg>
66
<!-- Setup the JMXConnectorServer on a specific rmi server port
67
<Call id="jmxConnectorServer" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
43
69
<New class="javax.management.remote.JMXServiceURL">
44
<Arg>service:jmx:rmi:///jndi/rmi:///jettymbeanserver</Arg>
70
<Arg>service:jmx:rmi://localhost:2100/jndi/rmi://localhost:2099/jmxrmi</Arg>