JBoss.orgCommunity Documentation
This chapter will give you answers on most popular questions asked by JMX plugin users.
To start using the JMX Tools, it's necessary to open MBean Explorer. Go to Window > Show View > Other and then select MBean Explorer and click OK.
The MBean Explorer lists all of the domains, mbeans, attributes, and operations inside a connection. When you double-click on a MBean in the MBean Explorer, it opens a multi-page editor to manage the MBean. The MBean Editor is composed of these pages:
Attributes page, to get/set the attributes of the MBean
Operations page, to invoke operations on the MBean
Notifications page, to receive notifications from the MBean
Info page, which displays general information about the MBean
It's possible to manage Tomcat using JMX Tools.
Currently, JMX Tooling is able to connect to Tomcat without authentication or with password-based authentication.
Using SSL for authentication is not supported: you need to make sure that the System property com.sun.management.jmxremote.ssl is set to false.
More information to manage Tomcat can be found in Tomcat management documentation.
Instructions to manage remotely Tomcat are available in Tomcat's monitoring documentation.
You can manage Equinox through the Equinox monitoring framework.
Once you have installed the Equinox monitoring framework and restarted Eclipse:
Go to Window > Open Perspective > Other and select the JMX perspective
Select JMX Server > Open Connection and click on OK
Switch to the MBean Explorer by going to Window > Show View > Other and selecting the MBean Explorer
Click on the
New Connection icon
in the MBean Explorer menu
bar
Select the Advanced tab and set the JMX URL to service:jmx:rmi:///jndi/rmi://:8118/jmxserver
You now have access to the MBeans exposed by Equinox.
Managing JBoss instances is not supported with the JMX Tools alone. You must also download and install the AS Tools portion of the JBoss Tools distribution. Even after installing the proper tooling, you cannot create a JBoss JMX connection yourself or through the Connection Wizard. The first step is to create a JBoss Server. The full instructions for this can be found in the AS Tools section, however, the short summary is:
Open the JBoss Servers View or the Servers View
Right-click in the view and select New > Server
In the JBoss Community section, select a server version
If a runtime has not yet been created, you'll be prompted for the server's home directory, JDK, and configuration
Finish the wizard and note that you have a new entry in both the JBoss Server View and the MBean Explorer
Start the server by right-clicking it and selecting Start
Note that once the server is started, the JMX connection can be expanded
Now you can explore MBeans exposed by a JBoss instance.
This section will outline how to contribute your own Server type with some default behavior.
You might be asking yourself why you'd need to extend this framework if JMX is a standard. Perhaps you want a connection to be automatically created after some specific action, or perhaps you want your connection wizard to do more than simply set a host and port. JBoss, for example, requires setting some credentials on the client machine, but using JBoss classes to do it. This requires that the connection have access to JBoss jars.
To create your own JMX Connection type, you must use the org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes one child, a connectionProvider with a class that implements org.jboss.tools.jmx.core.IConnectionProvider.
An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper objects. It must also keep a list of listeners that it is expected to inform when a connection is added or removed from its list.
Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting a "Root" object representing all JMX nodes. There are some utility methods the IConnectionWrapper can make use of.
There are two extension points currently approved for use in the UI
org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and wizardPage class for creation of new connections
org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some Control to present them in the MBean Editor
We hope, this guide helped you to get started with the JBoss JMX Tools. Besides, for additional information you are welcome on ">JBoss forum.
The MBean Explorer supports several different types of connections. The tooling itself comes only with a default connection type, however other adopters can provide additional connection types that may require additional or non-spec behavior. Connections can be in either the connected state or the disconnected state. Some connection types (such as the default connection type) allow you to control the current state. Other connection types may not.
Similarly, some connection types may be able to be created, and others may not. The default connection type, for example, can be created and deleted by you at will. The AS Tools connection type, which represents a JBoss server, does not allow you this level of control. A JBoss JMX connection is created when a JBoss server is created in the server's view, and deleted when said server is deleted. The JMX connection for this server is in the connected state only when the server is started.
There are two ways to connect to an application with remote management enabled:
The first step is the same for both - to connect to a MBean Server, click on the
New Connection icon
in the MBean Explorer menu bar.
Then to follow the simple one you just need to specify host, port (and optionally user name and password) and click OK.
The default JMX URL is service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi.
In case you need to connect to an application which has not used the "standard" JMX URL (e.g. Eclipse Equinox), you need chose more advance way, where it's necessary to specify explicitly a JMX URL in the Advanced tab of the JMX Connection window.
Only JMX URL based on RMI are supported.