Accessing WildFly JMX Bus Remotely with novaordis-jmx: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 28: Line 28:
</pre>
</pre>


Note that if using <tt>javax.management.remote.JMXServiceURL</tt>, only the "remoting-jmx" is needed as "protocol", the "service:imx" part is automatically prepended by the built-in logic.
Note that if using <tt>javax.management.remote.JMXServiceURL</tt>, only the "remoting-jmx" is needed as "protocol", the "service:imx" part is automatically prepended by the built-in logic:
 
<pre>
JMXServiceURL jmxServiceURL = new JMXServiceURL("remoting-jmx", host, port);
</pre>


==JBoss 7 URL==
==JBoss 7 URL==


=API=
=API=

Revision as of 19:49, 18 June 2017

Internal

Overview

The WildFly JMX bus can be accessed programmatically using standard JMX remoting API, as described in the Remote Access to a JMX Server section. novaordis-jmx is a library that provides a thin layer of functionality in top of the client-side JMX remoting API, with the intention to facilitate programmatic JMX access to a remote JMX bus. Note that novaordis-imx is NOT necessary for programmatic JMX access, but its code introduces a certain degree of convenience, and it can be used as an example for direct use of the JMX remote API.

Classpath

JBoss 6 Classpath

JBoss 6 exposes the JMX bus over its remoting protocol, so the JMX client needs JBoss remoting support in its classpath, which is available in ${JBOSS_HOME}/bin/client/jboss-cli-client.jar.

java ... -cp ...:${JBOSS_HOME}/bin/client/jboss-cli-client.jar:...

JBoss 7 Classpath

URL

JBoss 6 URL

service:jmx:remoting-jmx://localhost:9999

Note that if using javax.management.remote.JMXServiceURL, only the "remoting-jmx" is needed as "protocol", the "service:imx" part is automatically prepended by the built-in logic:

JMXServiceURL jmxServiceURL = new JMXServiceURL("remoting-jmx", host, port);

JBoss 7 URL

API