Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2013-10-24 19:31:08 +0000
committerJoakim Erdfelt2013-10-24 19:31:08 +0000
commit5c850a9bbbcb0abe64b3d6d95c44b098c525aba7 (patch)
treeb2966d6a05ce149fc6b0ee75137037ab95b0dac5
parentd6e301d7fd3f2f5dcfce66d9792ab493634e3b56 (diff)
downloadorg.eclipse.jetty.project-5c850a9bbbcb0abe64b3d6d95c44b098c525aba7.tar.gz
org.eclipse.jetty.project-5c850a9bbbcb0abe64b3d6d95c44b098c525aba7.tar.xz
org.eclipse.jetty.project-5c850a9bbbcb0abe64b3d6d95c44b098c525aba7.zip
420103 - Split out jmx-remote module from existing jmx module
+ modules/jmx.mod not changed + etc/jetty-jmx.xml simplified greatly + etc/jetty-jmx-remote.xml contains specifics for making jmx listen on the port specified in properties + new modules/jmx-remote.mod for enabling this feature
-rw-r--r--jetty-jmx/src/main/config/etc/jetty-jmx-remote.xml27
-rw-r--r--jetty-jmx/src/main/config/etc/jetty-jmx.xml44
-rw-r--r--jetty-jmx/src/main/config/modules/jmx-remote.mod11
3 files changed, 38 insertions, 44 deletions
diff --git a/jetty-jmx/src/main/config/etc/jetty-jmx-remote.xml b/jetty-jmx/src/main/config/etc/jetty-jmx-remote.xml
new file mode 100644
index 0000000000..20a2dda239
--- /dev/null
+++ b/jetty-jmx/src/main/config/etc/jetty-jmx-remote.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
+
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
+ <!-- Add a remote JMX connector. The parameters of the constructor
+ below specify the JMX service URL, and the object name string for the
+ connector server bean. The parameters of the JMXServiceURL constructor
+ specify the protocol that clients will use to connect to the remote JMX
+ connector (RMI), the hostname of the server (local hostname), port number
+ (automatically assigned), and the URL path. Note that URL path contains
+ the RMI registry hostname and port number, that may need to be modified
+ in order to comply with the firewall requirements.
+ -->
+ <New id="ConnectorServer" class="org.eclipse.jetty.jmx.ConnectorServer">
+ <Arg>
+ <New class="javax.management.remote.JMXServiceURL">
+ <Arg type="java.lang.String">rmi</Arg>
+ <Arg type="java.lang.String" />
+ <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
+ <Arg type="java.lang.String">/jndi/rmi://<SystemProperty name="jetty.jmxrmihost" default="localhost"/>:<SystemProperty name="jetty.jmxrmiport" default="1099"/>/jmxrmi</Arg>
+ </New>
+ </Arg>
+ <Arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</Arg>
+ <Call name="start" />
+ </New>
+</Configure>
+
diff --git a/jetty-jmx/src/main/config/etc/jetty-jmx.xml b/jetty-jmx/src/main/config/etc/jetty-jmx.xml
index 2732c4069e..aca96f7c2c 100644
--- a/jetty-jmx/src/main/config/etc/jetty-jmx.xml
+++ b/jetty-jmx/src/main/config/etc/jetty-jmx.xml
@@ -39,49 +39,5 @@
<New class="org.eclipse.jetty.util.log.Log" />
</Arg>
</Call>
-
- <!-- In order to connect to the JMX server remotely from a different
- process, possibly running on a different host, Jetty JMX module
- can create a remote JMX connector. It requires RMI registry to
- be started prior to creating the connector server because the
- JMX specification uses RMI to facilitate connections.
- -->
-
- <!-- Optionally start the RMI registry. Normally RMI registry runs on
- port 1099. The argument below can be changed in order to comply
- with the firewall requirements.
- -->
- <!--
- <Call name="createRegistry" class="java.rmi.registry.LocateRegistry">
- <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
- <Call name="sleep" class="java.lang.Thread">
- <Arg type="java.lang.Integer">1000</Arg>
- </Call>
- </Call>
- -->
-
- <!-- Optionally add a remote JMX connector. The parameters of the constructor
- below specify the JMX service URL, and the object name string for the
- connector server bean. The parameters of the JMXServiceURL constructor
- specify the protocol that clients will use to connect to the remote JMX
- connector (RMI), the hostname of the server (local hostname), port number
- (automatically assigned), and the URL path. Note that URL path contains
- the RMI registry hostname and port number, that may need to be modified
- in order to comply with the firewall requirements.
- -->
- <!--
- <New id="ConnectorServer" class="org.eclipse.jetty.jmx.ConnectorServer">
- <Arg>
- <New class="javax.management.remote.JMXServiceURL">
- <Arg type="java.lang.String">rmi</Arg>
- <Arg type="java.lang.String" />
- <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
- <Arg type="java.lang.String">/jndi/rmi://<SystemProperty name="jetty.jmxrmihost" default="localhost"/>:<SystemProperty name="jetty.jmxrmiport" default="1099"/>/jmxrmi</Arg>
- </New>
- </Arg>
- <Arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</Arg>
- <Call name="start" />
- </New>
- -->
</Configure>
diff --git a/jetty-jmx/src/main/config/modules/jmx-remote.mod b/jetty-jmx/src/main/config/modules/jmx-remote.mod
new file mode 100644
index 0000000000..25222755e8
--- /dev/null
+++ b/jetty-jmx/src/main/config/modules/jmx-remote.mod
@@ -0,0 +1,11 @@
+#
+# JMX Remote Feature
+#
+
+[depend]
+jmx
+
+[xml]
+# JMX remote configuration
+etc/jetty-jmx-remote.xml
+

Back to the top