You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/07/25 00:11:00 UTC
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java
costin 2002/07/24 15:10:59
Modified: jk/java/org/apache/jk/common JkMX.java
Log:
Added the host attribute - since MX4J now defaults to localhost.
Revision Changes Path
1.4 +15 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
Index: JkMX.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JkMX.java 7 Jun 2002 00:24:23 -0000 1.3
+++ JkMX.java 24 Jul 2002 22:10:59 -0000 1.4
@@ -78,6 +78,7 @@
{
MBeanServer mserver;
private int port=-1;
+ private String host;
public JkMX()
{
@@ -90,6 +91,18 @@
public void setPort( int i ) {
port=i;
}
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setHost(String host ) {
+ this.host=host;
+ }
+
+ public String getHost() {
+ return host;
+ }
public void createMBean( Object proxy, String name ) {
try {
@@ -114,7 +127,8 @@
try {
ObjectName serverName = new ObjectName("Http:name=HttpAdaptor");
mserver.createMBean("mx4j.adaptor.http.HttpAdaptor", serverName, null);
- //mserver.setAttribute(serverName, new Attribute("Host", "10.0.0.181"));
+ if( host!=null )
+ mserver.setAttribute(serverName, new Attribute("Host", host));
mserver.setAttribute(serverName, new Attribute("Port", new Integer(port)));
ObjectName processorName = new ObjectName("Http:name=XSLTProcessor");
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>