[jboss-cvs] JBossAS SVN: r108967 - trunk/system/src/main/java/org/jboss/system/server/jmx.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 28 10:35:14 EDT 2010
Author: smarlow at redhat.com
Date: 2010-10-28 10:35:14 -0400 (Thu, 28 Oct 2010)
New Revision: 108967
Modified:
trunk/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java
Log:
JBAS-8577 JMXConnector should support jmx-remoting.sar 'jmxconnector' alias
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-10-28 14:06:01 UTC (rev 108966)
+++ trunk/system/src/main/java/org/jboss/system/server/jmx/JMXConnector.java 2010-10-28 14:35:14 UTC (rev 108967)
@@ -58,6 +58,7 @@
private int rmiServerPort=1091; // rmi server will listen on this port
private String hostname= "localhost";
private static final String RMI_BIND_NAME = "jmxrmi";
+ private static final String LEGACY_RMI_BIND_NAME = "jmxconnector";
private static final String JNDI_BIND_NAME = "jmx/invoker/RMIAdaptor";
private static final String LEGACY_BIND_NAME = "jmx/rmi/RMIAdaptor";
private MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
@@ -144,6 +145,7 @@
adapter.start();
url = adapter.getAddress();
registry.rebind(RMI_BIND_NAME, rmiServer.toStub());
+ registry.rebind(LEGACY_RMI_BIND_NAME, rmiServer.toStub());
if(log.isDebugEnabled()) {
log.debug("started JMXConnector (" + url.toString() + ")" +
@@ -185,14 +187,15 @@
public void stop() {
try {
registry.unbind(RMI_BIND_NAME);
+ registry.unbind(LEGACY_RMI_BIND_NAME);
Util.unbind(context, JNDI_BIND_NAME);
Util.unbind(context, LEGACY_BIND_NAME);
UnicastRemoteObject.unexportObject(registry, true);
log.info(this.getClass().getSimpleName() + " stopped");
} catch (NotBoundException e) {
- log.error("connector was not bound ("+RMI_BIND_NAME+") to registry", e);
+ log.error("connector was not bound ("+RMI_BIND_NAME+" or "+LEGACY_RMI_BIND_NAME+") to registry", e);
} catch (IOException e) {
- log.error("couldn't unbind ("+RMI_BIND_NAME+") connector", e);
+ log.error("couldn't unbind ("+RMI_BIND_NAME+" or "+LEGACY_RMI_BIND_NAME+") connector", e);
} catch (NamingException e) {
log.error("couldn't unbind legacy adaptor (" +JNDI_BIND_NAME + " or " + LEGACY_BIND_NAME + ")", e);
}
More information about the jboss-cvs-commits
mailing list