Skip to content

Instantly share code, notes, and snippets.

@foragerr
Created February 23, 2016 05:07
Show Gist options
  • Save foragerr/da7e89e8dbf7b2562b77 to your computer and use it in GitHub Desktop.
Save foragerr/da7e89e8dbf7b2562b77 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<Configure class="org.mortbay.jetty.Server">
<!-- =========================================================== -->
<!-- Initialize an mbean server -->
<!-- =========================================================== -->
<!-- Use the jdk 1.5 platformMBeanServer -->
<Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/>
<!-- =========================================================== -->
<!-- Initialize the Jetty MBean container -->
<!-- =========================================================== -->
<Get id="Container" name="container">
<Call name="addEventListener">
<Arg>
<New class="org.mortbay.management.MBeanContainer">
<Arg><Ref id="MBeanServer"/></Arg>
<!-- If using < jdk1.5 uncomment to start http adaptor -->
<!-- Set name="managementPort">8082</Set -->
<Call name="start" />
</New>
</Arg>
</Call>
</Get>
<!-- Setup the RMIRegistry on a specific port-->
<Call id="rmiRegistry" class="java.rmi.registry.LocateRegistry" name="createRegistry">
<Arg type="int">2099</Arg>
</Call>
<!-- Setup the JMXConnectorServer on a specific rmi server port-->
<Call id="jmxConnectorServer" class="javax.management.remote.JMXConnectorServerFactory" name="newJMXConnectorServer">
<Arg>
<New class="javax.management.remote.JMXServiceURL">
<Arg>service:jmx:rmi://localhost:2100/jndi/rmi://localhost:2099/jmxrmi</Arg>
</New>
</Arg>
<Arg/>
<Arg><Ref id="MBeanServer"/></Arg>
<Call name="start"/>
</Call>
</Configure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment