forked from I2P_Developers/i2p.i2p
bundle jmx
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
jetty-java5-threadpool-xxx.jar: Concurrent thread pool for eepsite
|
||||
glassfish 2.1: Not used, too old, see Tomcat below.
|
||||
jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
|
||||
jetty-management: Not used by I2P, but only 34KB and could be useful for eepsites, and we bundled it with Jetty 5
|
||||
All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
|
||||
-->
|
||||
<copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
|
||||
@@ -93,6 +94,7 @@
|
||||
<copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
|
||||
<copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
|
||||
<copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
|
||||
<copy preservelastmodified="true" file="${jetty.base}/lib/management/jetty-management-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jmx.jar" />
|
||||
<copy file="${jetty.base}/lib/jsp-2.1/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
|
||||
<delete file="jetty.tar" />
|
||||
<delete dir="${jetty.base}" />
|
||||
|
@@ -400,7 +400,7 @@
|
||||
<group title="Desktopgui Application" packages="net.i2p.desktopgui:net.i2p.desktopgui.*" />
|
||||
<group title="I2PSnark Application" packages="org.klomp.snark:org.klomp.snark.*" />
|
||||
<group title="I2PTunnel Application" packages="net.i2p.i2ptunnel:net.i2p.i2ptunnel.*" />
|
||||
<group title="Jetty Logging" packages="org.mortbay.http" />
|
||||
<group title="Jetty Logging" packages="net.i2p.jetty" />
|
||||
<group title="SAM Bridge" packages="net.i2p.sam:net.i2p.sam.client" />
|
||||
<group title="SusiDNS Application" packages="i2p.susi.dns" />
|
||||
<group title="SusiMail Application" packages="i2p.susi.webmail:i2p.susi.webmail.*:i2p.susi.debug:i2p.susi.util:org.mortbay.servlet:org.mortbay.util" />
|
||||
@@ -706,7 +706,7 @@
|
||||
<copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
|
||||
<!-- all jetty stuff -->
|
||||
<copy todir="pkg-temp/lib" >
|
||||
<fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar" />
|
||||
<fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.*.jar" />
|
||||
</copy>
|
||||
<copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
|
||||
<copy file="build/streaming.jar" todir="pkg-temp/lib/" />
|
||||
@@ -967,7 +967,7 @@
|
||||
-->
|
||||
<target name="prepjupdate" depends="prepupdate, buildWEB">
|
||||
<copy todir="pkg-temp/lib" >
|
||||
<fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar" />
|
||||
<fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.*.jar" />
|
||||
</copy>
|
||||
<!-- We have to package the new eepsite files for MigrateJetty.java, but we
|
||||
can't overwrite an existing eepsite dir in a non-split configuration.
|
||||
|
@@ -46,6 +46,8 @@ clientApp.3.name=I2P webserver (eepsite)
|
||||
#clientApp.3.args="/path/to/jetty.xml" "/path/to/jetty-rewrite.xml"
|
||||
## To use local SSL, edit jetty-ssl.xml and use:
|
||||
#clientApp.3.args="/path/to/jetty.xml" "/path/to/jetty-ssl.xml"
|
||||
## To use local or remote JMX, edit jetty-jmx.xml and use:
|
||||
#clientApp.3.args="/path/to/jetty.xml" "/path/to/jetty-jmx.xml"
|
||||
clientApp.3.args="eepsite/jetty.xml"
|
||||
clientApp.3.delay=30
|
||||
clientApp.3.startOnLoad=true
|
||||
|
@@ -1,5 +1,3 @@
|
||||
# Files listed here will be deleted after the update is extracted
|
||||
# expired cert
|
||||
certificates/r31453.ovh.net
|
||||
# old jetty 5 libs
|
||||
lib/org.mortbay.jmx.jar
|
||||
|
89
installer/resources/eepsite/jetty-jmx.xml
Normal file
89
installer/resources/eepsite/jetty-jmx.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Configure the JVM JMX Server -->
|
||||
<!-- this configuration file should be used in combination with -->
|
||||
<!-- other configuration files. e.g. -->
|
||||
<!-- java -jar start.jar etc/jetty-jmx.xml etc/jetty.xml -->
|
||||
<!-- See jetty-jmx-mx4j.xml for a non JVM server solution -->
|
||||
<!-- =============================================================== -->
|
||||
<Configure id="Server" 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>
|
||||
<Call name="start" />
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
</Get>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Enable stats (why else are you using JMX? -->
|
||||
<!-- Sneakily replace the top-level handler with a StatisticsHandler -->
|
||||
<!-- Note we could use AtomicStatisticsHandler in jetty-java5-stats.jar (4KB) -->
|
||||
<!-- but it really isn't worth bundling it. -->
|
||||
<!-- http://blog.markfeeney.com/2010/10/jmx-statistics-in-jetty-6-6122.html -->
|
||||
<!-- =========================================================== -->
|
||||
<Get id="oldhandler" name="handler"/>
|
||||
<Set name="handler">
|
||||
<New id="StatsHandler" class="org.mortbay.jetty.handler.StatisticsHandler">
|
||||
<Set name="handler"><Ref id="oldhandler"/></Set>
|
||||
</New>
|
||||
</Set>
|
||||
|
||||
|
||||
<!--
|
||||
When setting up the JMXConnectorServer via RMI, two TCP ports are used to communicate with
|
||||
the remote server:
|
||||
* the rmiregistry port (by default 1099) from where the RMI stub is downloaded
|
||||
* the rmi server port (by default randomly chosen) where the actual RMI communication happens
|
||||
The JMXServiceURL for the default configuration is therefore:
|
||||
|
||||
service:jmx:rmi:///jndi/rmi://<remotehost>:1099/jmxrmi
|
||||
|
||||
In case a firewall is restricting port access, you need to make sure that the rmi server port
|
||||
is not chosen randomly, and this can be specified with the following JMXServiceURL:
|
||||
|
||||
service:jmx:rmi://<host>:2100/jndi/rmi://<host>:2099/jmxrmi
|
||||
|
||||
where 2099 is the rmiregistry port and 2100 is the rmi server port.
|
||||
Make sure the firewall allow access to those ports.
|
||||
|
||||
When using the XML configuration below, you don't need to specify any of the JMX system properties
|
||||
on the command line (see http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html).
|
||||
-->
|
||||
|
||||
<!-- 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>
|
||||
|
Reference in New Issue
Block a user