activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1358147 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
Date Fri, 06 Jul 2012 11:50:16 GMT
Author: dejanb
Date: Fri Jul  6 11:50:16 2012
New Revision: 1358147

URL: http://svn.apache.org/viewvc?rev=1358147&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3915 - jmx connectorHost to bind to the specified
address

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java?rev=1358147&r1=1358146&r2=1358147&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/jmx/ManagementContext.java
Fri Jul  6 11:50:16 2012
@@ -24,8 +24,10 @@ import javax.management.*;
 import javax.management.remote.JMXConnectorServer;
 import javax.management.remote.JMXConnectorServerFactory;
 import javax.management.remote.JMXServiceURL;
+import javax.net.ServerSocketFactory;
 import java.io.IOException;
 import java.lang.reflect.Method;
+import java.net.InetAddress;
 import java.net.MalformedURLException;
 import java.net.ServerSocket;
 import java.rmi.registry.LocateRegistry;
@@ -427,7 +429,7 @@ public class ManagementContext implement
                 registry = LocateRegistry.createRegistry(connectorPort, null, new RMIServerSocketFactory()
{
                     public ServerSocket createServerSocket(int port)
                             throws IOException {
-                        registrySocket = new ServerSocket(port);
+                        registrySocket = ServerSocketFactory.getDefault().createServerSocket(connectorPort,
0, InetAddress.getByName(connectorHost));
                         registrySocket.setReuseAddress(true);
                         return registrySocket;
                     }});



Mime
View raw message