Skip to content

Plain Java Servlet Integration

cyrille-leclerc edited this page Apr 13, 2013 · 1 revision

Note: since version 1.0.6

Declare a ServletContextListenerin the web.xml configuration file.

<webapp ...>
    <context-param>
        <param-name>jmxtrans.config</param-name>
        <param-value>
            classpath:jmxtrans.json
            classpath:org/jmxtrans/embedded/config/jmxtrans-internals.json
            classpath:org/jmxtrans/embedded/config/tomcat-7.json
            classpath:org/jmxtrans/embedded/config/jvm-sun-hotspot.json
        </param-value>
    </context-param>
    <listener>
        <listener-class>org.jmxtrans.embedded.servlet.EmbeddedJmxTransLoaderListener</listener-class>
    </listener>
</webapp>
  • jmxtrans.config: coma/line-break delimited list of jmxtrans configuration file urls (classpath:..., http://..., file:/...). Default value is classpath:jmxtrans.json, classpath:org/jmxtrans/embedded/config/jmxtrans-internals.json. Optional.