mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3915 - jmx connectorHost to bind to the specified address
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1358147 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9601f6742e
commit
d1a0419a02
|
@ -24,8 +24,10 @@ import javax.management.*;
|
||||||
import javax.management.remote.JMXConnectorServer;
|
import javax.management.remote.JMXConnectorServer;
|
||||||
import javax.management.remote.JMXConnectorServerFactory;
|
import javax.management.remote.JMXConnectorServerFactory;
|
||||||
import javax.management.remote.JMXServiceURL;
|
import javax.management.remote.JMXServiceURL;
|
||||||
|
import javax.net.ServerSocketFactory;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.net.InetAddress;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.rmi.registry.LocateRegistry;
|
import java.rmi.registry.LocateRegistry;
|
||||||
|
@ -427,7 +429,7 @@ public class ManagementContext implements Service {
|
||||||
registry = LocateRegistry.createRegistry(connectorPort, null, new RMIServerSocketFactory() {
|
registry = LocateRegistry.createRegistry(connectorPort, null, new RMIServerSocketFactory() {
|
||||||
public ServerSocket createServerSocket(int port)
|
public ServerSocket createServerSocket(int port)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
registrySocket = new ServerSocket(port);
|
registrySocket = ServerSocketFactory.getDefault().createServerSocket(connectorPort, 0, InetAddress.getByName(connectorHost));
|
||||||
registrySocket.setReuseAddress(true);
|
registrySocket.setReuseAddress(true);
|
||||||
return registrySocket;
|
return registrySocket;
|
||||||
}});
|
}});
|
||||||
|
|
Loading…
Reference in New Issue