[jboss-cvs] JBossAS SVN: r103511 - in trunk: system/src/main/java/org/jboss/system/server/jmx and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Apr 5 00:02:34 EDT 2010
Author: smarlow at redhat.com
Date: 2010-04-05 00:02:34 -0400 (Mon, 05 Apr 2010)
New Revision: 103511
Modified:
trunk/server/src/etc/deploy/jmx-jboss-beans.xml
trunk/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java
Log:
JBAS-7873 bindings-jboss-beans.xml support for new JSR160 jmx connector and address cluster unit test regression
Modified: trunk/server/src/etc/deploy/jmx-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deploy/jmx-jboss-beans.xml 2010-04-05 00:52:59 UTC (rev 103510)
+++ trunk/server/src/etc/deploy/jmx-jboss-beans.xml 2010-04-05 04:02:34 UTC (rev 103511)
@@ -17,8 +17,11 @@
<!-- configuration properties -->
- <!-- specify the hostname that will run the JMX connector -->
- <property name="hostname">${jboss.bind.address}</property>
+ <!-- specify the NIC that will run the JMX connector -->
+ <property name="hostname">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmi"/>
+ </property>
<!-- specify the port that the JMX connector is looked up through (used in JMXServiceURL) -->
<!-- commenting this out, will use 1090 as default and will conflict -->
Modified: trunk/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java
===================================================================
--- trunk/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java 2010-04-05 00:52:59 UTC (rev 103510)
+++ trunk/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java 2010-04-05 04:02:34 UTC (rev 103511)
@@ -22,6 +22,8 @@
package org.jboss.system.server.jmx;
import org.jboss.logging.Logger;
+import org.jboss.net.sockets.DefaultClientSocketFactory;
+import org.jboss.net.sockets.DefaultSocketFactory;
import org.jboss.util.naming.Util;
import javax.management.MBeanServer;
@@ -105,8 +107,15 @@
}
public void start() throws Exception {
+ if(log.isInfoEnabled()) {
+ log.info("starting JMXConnector on host " + hostname + ":" + rmiRegistryPort);
+ }
+ DefaultClientSocketFactory clientSocketFactory = new DefaultClientSocketFactory();
+ clientSocketFactory.setBindAddress(hostname);
+ DefaultSocketFactory serverSocketFactory = new DefaultSocketFactory();
+ serverSocketFactory.setBindAddress(hostname);
+ registry = LocateRegistry.createRegistry(rmiRegistryPort, clientSocketFactory, serverSocketFactory);
rmiServer = new RMIJRMPServerImpl( 0, null, null, new HashMap());
- registry = LocateRegistry.createRegistry(rmiRegistryPort);
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://" + hostname);
HashMap env = new HashMap();
adapter = new RMIConnectorServer(url, env, rmiServer, mbeanServer);
More information about the jboss-cvs-commits
mailing list