~ubuntu-branches/ubuntu/utopic/jetty/utopic-proposed

« back to all changes in this revision

Viewing changes to modules/management/src/main/config/etc/jetty-jmx.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2010-04-29 07:36:43 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100429073643-eo2x6y2fit4m6o66
Tags: 6.1.24-2
* Set JAVA_HOME in d/rules to /usr/lib/jvm/default-java. (Closes: #578618,
  #579469)
* Fix the installation of jetty-util5.jar. (Closes: #569328)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
    <!-- Use the jdk 1.5 platformMBeanServer -->
18
18
    <Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/>
19
19
 
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"/>
22
22
    -->
23
 
    
 
23
 
24
24
    <!-- =========================================================== -->
25
25
    <!-- Initialize the Jetty MBean container                        -->
26
26
    <!-- =========================================================== -->
36
36
        </Arg>
37
37
      </Call>
38
38
    </Get>
39
 
    
40
 
    <!-- optionally add a remote JMX connector 
41
 
    <Call id="jmxConnector" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
 
39
 
 
40
    <!--
 
41
    When setting up the JMXConnectorServer via RMI, two TCP ports are used to communicate with
 
42
    the remote server:
 
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:
 
46
 
 
47
    service:jmx:rmi:///jndi/rmi://<remotehost>:1099/jmxrmi
 
48
 
 
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:
 
51
 
 
52
    service:jmx:rmi://<host>:2100/jndi/rmi://<host>:2099/jmxrmi
 
53
 
 
54
    where 2099 is the rmiregistry port and 2100 is the rmi server port.
 
55
    Make sure the firewall allow access to those ports.
 
56
 
 
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).
 
59
    -->
 
60
 
 
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>
 
64
    </Call>
 
65
    -->
 
66
    <!-- Setup the JMXConnectorServer on a specific rmi server port
 
67
    <Call id="jmxConnectorServer" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
42
68
      <Arg>
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>
45
71
        </New>
46
72
      </Arg>
47
73
      <Arg/>
49
75
      <Call name="start"/>
50
76
    </Call>
51
77
    -->
52
 
    
 
78
 
53
79
</Configure>
54
80