Skip to content

Instantly share code, notes, and snippets.

@guaxinim
Created May 14, 2013 17:17
Show Gist options
  • Save guaxinim/5577728 to your computer and use it in GitHub Desktop.
Save guaxinim/5577728 to your computer and use it in GitHub Desktop.
Acesso ao JBoss EAP 6 remoto via VisualVM
JBoss implements a JSR 160 compliant JMXConnector instead of an RMI interface to establish a connection to a JMX MBeanServer form a remote client.
There is no need for any additional JVM options. The JMXConnector uses under the hood JBoss Remoting for the transport and by default the native management endpoint of the AS7 if the server is running in the standalone mode.
To access the management endpoints a management user in the realm ManagementRealm is required
add the user: ./add-user.sh
Add the folowing libs on classpath:
org/jboss/remoting3/remoting-jmx
org/jboss/remoting3
org/jboss/logging
org/jboss/xnio
org/jboss/xnio/nio
org/jboss/sasl
org/jboss/marshalling
org/jboss/marshalling/river
Use:
service:jmx:remoting-jmx://IP:PORT
Classpath Example:
/usr/java/jdk1.6.0_25/bin/jvisualvm --cp:a /opt/jboss-eap-6.0/modules/org/jboss/remoting3/remoting-jmx/main/remoting-jmx-1.0.3.Final-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/remoting3/main/jboss-remoting-3.2.8.GA-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/logging/main/jboss-logging-3.1.1.GA-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/xnio/main/xnio-api-3.0.4.GA-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/xnio/nio/main/xnio-nio-3.0.4.GA-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/sasl/main/jboss-sasl-1.0.1.Final-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/marshalling/main/jboss-marshalling-1.3.14.GA-redhat-1.jar:/opt/jboss-eap-6.0/modules/org/jboss/marshalling/river/main/jboss-marshalling-river-1.3.14.GA-redhat-1.jar
-----------------
If you are running the server in the standalone mode the native management endpoint will be used. The default port of the native management interface is 9999.
JMX subsystem configuration in standalone mode:
<subsystem xmlns="urn:jboss:domain:jmx:1.1">
<show-model value="true"/>
<remoting-connector />
</subsystem>
JMX Connection URL: service:jmx:remoting-jmx:IP:9999
IP = the binding of the management interface
If you are running the server in the domain mode, the remoting endpoint will be used.
The default port of the remoting connector in the domain mode is 4447 plus port offset, if configured.
JMX subsystem configuration in domain mode:
<subsystem xmlns="urn:jboss:domain:jmx:1.1">
<show-model value="true"/>
<remoting-connector use-management-endpoint="false"/>
</subsystem>
JMX Connection URL: service:jmx:remoting-jmx:IP:4447
IP = the binding of the management interface of a server instance from the domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment