---
title: "How to configure JMX for Tomcat7 that is running behind firewall."
author: "j357777842"
date: "2010-09-02T16:37:34Z"
tags: ["Apache", "SUN", "Tomcat", "XML"]
categories: ["企业架构"]
slug: "how-to-configure-jmx-for-tomcat7-that-is-running-behind-firewall"
draft: false
lastmod: "2010-09-02T16:37:34Z"
id: 753710
url: "https://herhun.iteye.com/blog/753710"
---

1\. 修改Tomcat 7的源码:org.apache.catalina.mbeans.JmxRemoteLifecycleListener. Add Getter and Setter methods for property clientAuth. update properties rmiRegistryPortPlatform and rmiServerPort humanly to rmiRegistryPort and rmiServerPort. Modify method names corresponding these properties. Delete below lines: // String clientAuthValue = System.getProperty( // "com.sun.management.jmxremote.ssl.need.client.auth", "true"); // clientAuth = Boolean.parseBoolean(clientAuthValue); // String authenticateValue = System.getProperty( // "com.sun.management.jmxremote.authenticate", "true"); 2. Package this single class to a jar file and place this jar file in Tomcat\_home/lib. 3. Modify server.xml: Add a lisener into server.xml: