Author: mcaspers
Date: 2011-01-19 19:28:02 -0500 (Wed, 19 Jan 2011)
New Revision: 28414
Modified:
trunk/jmx/docs/reference/en-US/tasks.xml
Log:
General Updates
Modified: trunk/jmx/docs/reference/en-US/tasks.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/tasks.xml 2011-01-19 23:39:41 UTC (rev 28413)
+++ trunk/jmx/docs/reference/en-US/tasks.xml 2011-01-20 00:28:02 UTC (rev 28414)
@@ -1,162 +1,184 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="tasks">
- <?dbhtml filename="tasks.html"?>
- <title>JMX Tools Tasks</title>
- <para>This chapter will give you answers on most popular questions asked by
<property>JMX
- plugin</property> users.</para>
- <section>
- <title>Quick Start</title>
-
- <para>To start using the <property>JMX Tools</property>
it's necessary to open
- <property>MBean Explorer</property>. Go to
<emphasis><property>Window > Show View >
Other</property></emphasis> and then select
- <property>MBean Explorer</property> and click
<emphasis><property>OK</property>.</emphasis></para>
-
- <para>The <property>MBean Explorer</property> lists all the
domains, mbeans, attributes, and operations inside a
- connection. When you double-click a MBean in the
<emphasis><property>MBean Explorer</property>,</emphasis> it opens
a multi-page
- editor to manage the MBean. The <property>MBean Editor</property>
is composed of these pages:</para>
-
- <itemizedlist>
- <listitem>
- <para><emphasis><property>Attributes
page</property>,</emphasis> to get/set the attributes of the
MBean</para>
- </listitem>
- <listitem>
- <para><emphasis><property>Operations
page</property>,</emphasis> to invoke operations on the MBean</para>
- </listitem>
- <listitem>
- <para><emphasis><property>Notifications
page</property>,</emphasis> to receive notifications from the
MBean</para>
- </listitem>
- <listitem>
- <para><emphasis><property>Info
page</property>,</emphasis> which displays general information about the MBean
</para>
- </listitem>
- </itemizedlist>
-
- </section>
-
- <section>
- <title>Managing Application</title>
+ <?dbhtml filename="tasks.html"?>
+ <title>JMX Tools Tasks</title>
+ <para>This chapter will provide answers to common questions asked by
<property>JMX plugin</property> users.</para>
+ <section>
+ <title>Quick Start</title>
+ <para>
+ To start using the <property>JMX Tools</property> it's necessary
to open <property>MBean Explorer</property>. Go to
<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show
View</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>,
select <guimenuitem>MBean Explorer</guimenuitem> and click the
<guibutton>OK</guibutton> button.
+ </para>
+ <para>
+ The <property>MBean Explorer</property> lists all the domains, mbeans,
attributes, and operations inside a connection. When you double-click an MBean in the
<emphasis><property>MBean Explorer</property>,</emphasis> it opens
a multi-page editor to manage the MBean. The <property>MBean Editor</property>
is composed of these pages:
+ </para>
-<para>As it's been said earlier in the guide the JMX technology allows to
monitor and manage Java applications. In this section we will show you how to get
connected to
-a sample Java application and run the <property>sayHello()</property> method
remotely from inside of the <property>MBean Explorer</property>.</para>
-<orderedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>
+ <property>Attributes page</property>,</emphasis> to get/set the
attributes of the MBean</para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>
+ <property>Operations page</property>,</emphasis> to invoke
operations on the MBean</para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>
+ <property>Notifications page</property>,</emphasis> to receive
notifications from the MBean</para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>
+ <property>Info page</property>,</emphasis> which displays general
information about the MBean </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Managing Application</title>
+
+ <para>
+ As it's been said earlier in the guide that the JMX technology allows you to
monitor and manage Java applications. In this section we will show you how to get
connected to a sample Java application and run the <code>sayHello()</code>
method remotely from inside of the <property>MBean Explorer</property>.
+ </para>
+ <orderedlist>
+
<!--
http://java.sun.com/docs/books/tutorial/jmx/examples/jmx_examples.zip -->
-<listitem><para>Save the bundle of JMX API sample classes, <ulink
url="http://java.sun.com/docs/books/tutorial/jmx/examples/jmx_exampl...;,
to your working directory</para></listitem>
-<listitem><para>Unzip the bundle of sample
classes.</para></listitem>
-<listitem><para>Compile the example Java classes from within where you
unpacked the files directory.</para>
+ <listitem>
+ <para>
+ Save the bundle of JMX API sample classes, <ulink
url="http://java.sun.com/docs/books/tutorial/jmx/examples/jmx_exampl...;,
to your working directory
+ </para>
+ </listitem>
+ <listitem>
+ <para>Unzip the bundle of sample classes.</para>
+ </listitem>
+ <listitem>
+ <para>Compile the example Java classes from within where you unpacked the files
directory.</para>
- <programlisting role="XML"><![CDATA[
- javac com/example/*.java
- ]]></programlisting>
+ <programlisting role="XML"><![CDATA[javac
com/example/*.java]]></programlisting>
-</listitem>
-<listitem><para>Start the <property>Main</property> application,
specifying the properties that expose Main for remote management:</para>
+ </listitem>
+ <listitem>
+ <para>Start the <code>Main</code> application, specifying the
properties that expose Main for remote management:</para>
- <programlisting role="XML"><![CDATA[
+ <programlisting role="XML"><![CDATA[
java -Dcom.sun.management.jmxremote.port=9999 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
com.example.Main
- ]]></programlisting>
+ ]]></programlisting>
+
+ <para>If everything was done correctly you will see the <screen>Waiting
for incoming requests...</screen> message on the screen.</para>
-<para>If everything was done correctly you will see the "Waiting for incoming
requests..." message on the screen.</para>
+ </listitem>
+ <listitem>
+ <para>
+ Now launch the Eclipse IDE, in Eclipse open the <guilabel>MBean
Explorer</guilabel>. Go to
<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show
View</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>
and then select <guimenuitem>MBean Explorer</guimenuitem> and click the
<guibutton>OK</guibutton> button)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Click the <guibutton>New Connection</guibutton> icon
<inlinemediaobject><imageobject><imagedata
fileref="images/new_connection_icon.png"/></imageobject></inlinemediaobject>
in the <property>MBean Explorer</property> menu bar.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ In the <guilabel>Create JMX Connection</guilabel> dialog, click the
<guibutton>Next</guibutton> button and then click the
<property>Advanced</property> tab.
+ </para>
+ </listitem>
- </listitem>
- <listitem><para>Now launch the Eclipse IDE, in Eclipse open the
<property>MBean Explorer</property>. Go to
<emphasis><property>Window > Show View >
Other</property></emphasis> and then select
- <property>MBean Explorer</property> and click
<emphasis><property>OK</property></emphasis>)</para></listitem>
- <listitem>
- <para>Click the <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
- bar.</para>
- </listitem>
-
- <listitem><para>In the <property>Create JMX
Connection</property> dialog, hit <property>Next</property> and then
click the <property>Advanced</property> tab. </para></listitem>
-
-
- <listitem><para>In the <property>JMX URL</property> input field
enter the following URL:</para>
-
- <programlisting role="XML"><![CDATA[
- service:jmx:rmi:///jndi/rmi://:9999/jmxrmi
- ]]></programlisting>
-
- <figure>
- <title>JMX Connection</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/mbeans.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- <listitem><para>Press <property>Finish</property> to esteblish
the connection with the application.</para>
- </listitem>
-
- <listitem><para>Now expand the connection you have just created, then open
the <property>com.example</property> package and click
<property>sayHello()</property> method. </para>
- <para>Once the <property>sayHello()</property> method is clicked the
<property>MBean Editor</property> is activated. </para>
-
- </listitem>
-
- <listitem><para>In the <property>MBean Editor</property> go to
the <property>Operation Details</property> section and hit the
<property>sayHello()</property> button.</para><para> You will get
the "Operation inoked successfully" message. </para>
-
- <figure>
- <title>Ivoking Method via JMX</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/invokemethod.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- <listitem><para>The final step is to make sure the application worked as
it was expected. Open the terminal where you launched the application in step 3. Now you
see the "hello, world" message on the screen. </para>
- </listitem>
-</orderedlist>
+ <listitem>
+ <para>In the <guilabel>JMX URL</guilabel> input field enter the
following URL:</para>
+ <programlisting
role="XML"><![CDATA[service:jmx:rmi:///jndi/rmi://:9999/jmxrmi]]></programlisting>
- </section>
- <section>
- <title>Tomcat Managing</title>
+ <figure>
+ <title>JMX Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbeans.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ <listitem>
+ <para>Click the <guibutton>Finish</guibutton> button to establish
the connection with the application.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Now expand the connection you have just created, then open the
<guilabel>com.example</guilabel> package and click the
<code>sayHello()</code> method.
+ </para>
+ <para>Once the <code>sayHello()</code> method is clicked the
<guilabel>MBean Editor</guilabel> is activated. </para>
+
+ </listitem>
+
+ <listitem>
+ <para>
+ In the <guilabel>MBean Editor</guilabel> go to the
<guilabel>Operation Details</guilabel> section and click the
<code>sayHello()</code> button.
+ </para>
+ <para> You will get the "Operation invoked successfully" message.
</para>
+
+ <figure>
+ <title>Ivoking Method via JMX</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/invokemethod.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ <listitem>
+ <para>
+ The final step is to make sure the application worked as it was expected. Open the
terminal where you launched the application in step 3. Now you see the "hello,
world" message on the screen.
+ </para>
+ </listitem>
+ </orderedlist>
+
+ </section>
+ <section>
+ <title>Tomcat Managing</title>
+
+ <para>It is possible to manage Tomcat using <property>JMX
Tools</property>.</para>
+
+ <para>Currently, JMX Tooling is able to connect to Tomcat without authentication
or with password-based authentication.</para>
+ <para>
+ Using SSL for authentication is not supported: you need to make sure that the System
property <guilabel>com.sun.management.jmxremote.ssl</guilabel> is set to
false.
+ </para>
+ <para>
+ More information to manage Tomcat can be found in <ulink
url="http://tomcat.apache.org/tomcat-6.0-doc/">Tomcat management
documentation</ulink>.
+ </para>
+ <para>
+ Instructions to manage remotely Tomcat are available in <ulink
url="http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html"&g...
monitoring documentation</ulink>.
+ </para>
- <para>It's possible to manage Tomcat using <property>JMX
Tools</property>.</para>
-
- <para>Currently, JMX Tooling is able to connect to Tomcat without
authentication or with
- password-based authentication.</para>
- <para>Using SSL for authentication is not supported: you need to make sure
that the System
- property <emphasis>
- <property>com.sun.management.jmxremote.ssl</property>
- </emphasis> is set to false. </para>
- <para>More information to manage Tomcat can be found in <ulink
url="http://tomcat.apache.org/tomcat-6.0-doc/">Tomcat management
documentation</ulink>.</para>
- <para>Instructions to manage remotely Tomcat are available in <ulink
url="http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html"&g...
monitoring documentation</ulink>.</para>
-
-
- </section>
-
- <section>
- <title>Eclipse Equinox Managing</title>
-
- <para>You can manage Equinox through the Equinox monitoring
framework.</para>
- <para>In this section we will show you how to connect to an Equinox server via
JBoss JMX tools. First off, you need to make for example a simple servlet and run it on a
server. This guide is not intended to teach you how to build application and run them on
the server, you can read for example <ulink
url="http://www.eclipse.org/equinox-portal/tutorials/server-side/&qu... this
tutorial </ulink> to get a better idea of how to build server-based applications
with Eclipse Equinox. </para>
- <para>Once you have run an application on the server you can connect to it using
JBoss JMX tools.</para>
-
- <orderedlist>
- <listitem>
- <para>Go to <emphasis>
- <property>Window > Open Perspective >
Other</property>
- </emphasis> and select the <property>JMX
perspective.</property></para>
- </listitem>
+
+ </section>
+
+ <section>
+ <title>Eclipse Equinox Managing</title>
+
+ <para>You can manage Equinox through the Equinox monitoring
framework.</para>
+ <para>
+ In this section we will show you how to connect to an Equinox server via JBoss JMX
tools. First off, you need to create a simple servlet and run it on a server. This guide
is not intended to teach you how to build application and run them on the server,
<ulink
url="http://www.eclipse.org/equinox-portal/tutorials/server-side/&qu...
this tutorial </ulink> can be used to give you a better idea of how to build
server-based applications with Eclipse Equinox.
+ </para>
+ <para>Once you have run an application on the server you can connect to it using
JBoss JMX tools.</para>
+
+ <orderedlist>
+ <listitem>
+ <para>
+ Go to
<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open
Perspective</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>
and select the <guimenuitem>JMX perspective</guimenuitem>.
+ </para>
+ </listitem>
<!--<listitem>
<para>Select <emphasis>
@@ -165,248 +187,187 @@
<property>OK</property>
</emphasis></para>
</listitem>-->
-
- <listitem>
- <para>Switch to the <property>MBean Explorer</property>
by going to <emphasis>
- <property>Window > Show View >
Other</property>
- </emphasis> and selecting the MBean Explorer.</para>
- </listitem>
-
- <listitem>
- <para>Click the <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
- bar.</para>
- </listitem>
-
- <listitem>
- <para>Select the <emphasis>
- <property>Advanced tab</property></emphasis> and
set the JMX URL to <emphasis>
-
<property>service:jmx:rmi:///jndi/rmi://:8118/jmxserver.</property>
- </emphasis></para>
-
- <figure>
- <title>Using JMX Tools to Access Equinox Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/equinox.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </orderedlist>
-
- <para>You now have access to the MBeans exposed by Equinox.</para>
- </section>
+ <listitem>
+ <para>Switch to the <property>MBean Explorer</property> by
selecting
<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show
View</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>
and selecting the <guimenuitem>MBean Explorer</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the <guibutton>New Connection</guibutton> icon
<inlinemediaobject><imageobject><imagedata
fileref="images/new_connection_icon.png"/></imageobject></inlinemediaobject>
in the <property>MBean Explorer</property> menu bar.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Select the <guilabel>Advanced tab</guilabel> and set the JMX URL to
<guilabel>service:jmx:rmi:///jndi/rmi://:8118/jmxserver.</guilabel>
+ </para>
+
+ <figure>
+ <title>Using JMX Tools to Access Equinox Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/equinox.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </listitem>
+ </orderedlist>
+
+ <para>You now have access to the MBeans exposed by Equinox.</para>
+ </section>
-
- <section>
- <title>Managing JBoss AS</title>
-
- <para>Managing JBoss instances is not supported with the
<property>JMX Tools</property>
- alone. You must also download and install the <property>AS
Tools</property> portion of
- the <property>JBoss Tools</property> 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:
</para>
- <orderedlist>
- <listitem>
- <para>Open the <property>Servers</property>
view.</para>
- </listitem>
-
- <listitem>
- <para>Right-click in the view and select <emphasis>
- <property>New > Server</property>
- </emphasis>.</para>
- </listitem>
-
- <listitem>
- <para>In the <emphasis>
- <property>JBoss Enterprise Middleware</property>
- </emphasis> or in <emphasis>
- <property>JBoss Community</property>
- </emphasis> section, select a server version.</para>
- </listitem>
-
- <listitem>
- <para>If a runtime has not yet been created, you'll be
prompted for the
- server's home directory, JDK, and configuration.</para>
- </listitem>
-
- <listitem>
- <para>Finish the wizard and note that you have a new entry in both
the
- <property>Servers</property> view and the
<property>MBean
- Explorer</property>.</para>
- </listitem>
-
- <listitem>
- <para>Start the server by right-clicking it and selecting
<emphasis>
-
<property>Start</property></emphasis>.</para>
- </listitem>
- <listitem>
- <para>Note that once the server is started, the JMX connection can
be
- expanded.</para>
- </listitem>
- </orderedlist>
-
- <para>Now you can explore MBeans exposed by a JBoss instance.</para>
- </section>
+
+ <section>
+ <title>Managing JBoss AS</title>
+
+ <para>
+ Managing JBoss instances is not supported with the <property>JMX
Tools</property> alone. You must also download and install the <property>AS
Tools</property> portion of the <property>JBoss Tools</property>
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:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>Open the <property>Servers</property> view.</para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click in the view and select
<menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Server</guimenuitem></menuchoice>.</para>
+ </listitem>
+
+ <listitem>
+ <para>In the <guilabel>JBoss Enterprise Middleware</guilabel> or in
<guilabel>JBoss Community</guilabel> section, select a server
version.</para>
+ </listitem>
+
+ <listitem>
+ <para>If a runtime has not yet been created, you will be prompted for the
server's home directory, JDK, and configuration.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Finish the wizard and note that you have a new entry in both the
<guilabel>Servers</guilabel> view and the <guilabel>MBean
Explorer</guilabel>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Start the server by right-clicking it and selecting
<guimenuitem>Start</guimenuitem>.</para>
+ </listitem>
+ <listitem>
+ <para>Note that once the server is started, the JMX connection can be
expanded.</para>
+ </listitem>
+ </orderedlist>
+
+ <para>Now you can explore MBeans exposed by a JBoss instance.</para>
+ </section>
- <section>
- <title>Managing JBoss AS Remotely</title>
-
- <para>JBoss JMX Tool allow you to easily get access and mangane JBoss AS
server remotely.
- In order to get connected to the instance of JBoss AS remotely you need to run the
server or make sure the server is lauched.
+ <section>
+ <title>Managing JBoss AS Remotely</title>
+
+ <para>
+ JBoss JMX Tool allow you to easily get access and manage a JBoss AS server remotely.
In order to connect to the instance of JBoss AS remotely you need to run the server or
make sure the server is launched.
</para>
- <orderedlist>
- <listitem>
- <para>Go to <emphasis>
- <property>Window > Open Perspective >
Other</property>
- </emphasis> and select the <property>JMX
perspective.</property></para>
- </listitem>
- <listitem>
- <para>Switch to the <property>MBean Explorer</property>
by going to <emphasis>
- <property>Window > Show View >
Other</property>
- </emphasis> and selecting the MBean Explorer.</para>
- </listitem>
-
- <listitem>
- <para>Click the <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
- bar.</para>
- </listitem>
-
- <listitem>
- <para>Select the <emphasis>
- <property>Advanced tab</property></emphasis> and
set the JMX URL to: </para>
- <programlisting role="XML"><![CDATA[
-service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
- ]]></programlisting>
-
- <para>Please, note that in this example we connected to the local host.
</para>
- </listitem>
- </orderedlist>
- </section>
- <section id="extensions" xreflabel="extensions">
- <title>Extension Task</title>
- <para>This section will outline how to contribute your own Server type with
some default
- behavior.</para>
+ <orderedlist>
+ <listitem>
+ <para>Go to
<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open
Perspective</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>
and select the <guimenuitem>JMX perspective.</guimenuitem>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Switch to the <guilabel>MBean Explorer</guilabel> by going to
<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show
View</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice>
and selecting the <guimenuitem>MBean Explorer</guimenuitem>.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Click the <guibutton>New Connection</guibutton> icon
<inlinemediaobject><imageobject><imagedata
fileref="images/new_connection_icon.png"/></imageobject></inlinemediaobject>in
the <guilabel>MBean Explorer</guilabel> menu bar.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <guilabel>Advanced tab</guilabel> and set the JMX
URL to:</para>
+ <programlisting
role="XML"><![CDATA[service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector]]></programlisting>
+
+ <para>Please, note that in this example we connected to the local host.
</para>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="extensions" xreflabel="extensions">
+ <title>Extension Task</title>
+ <para>This section will outline how to contribute your own Server type with some
default behavior.</para>
+
+ <section>
+ <title>Why we should do that?</title>
+
+ <para>
+ You might be asking yourself why you would 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
uses JBoss classes to do it. This requires that the connection have access to JBoss jars.
+ </para>
+ </section>
+
+ <section>
+ <title>Core Extensions</title>
+
+ <para>
+ To create your own JMX Connection type, you must use the
<code>org.jboss.tools.jmx.core.MBeanServerConnectionProvider</code> extension
point. This point takes one child, a connectionProvider with a class that implements
<code>org.jboss.tools.jmx.core.IConnectionProvider</code>.
+ </para>
+
+ <para>
+ An <code>IConnectionProvider</code> is responsible for creation and
deletion of <code>IConnectionWrapper</code> 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.
+ </para>
+
+ <para>
+ Each <code>IConnectionWrapper</code> is expected to handle running
arbitrary JMX runnables or getting a "Root" object representing all JMX nodes.
There are some utility methods the <code>IConnectionWrapper</code> can make
use of.
+ </para>
+ </section>
+
+ <section>
+ <title>UI Extensions</title>
+ <para>There are two extension points currently approved for use in the
UI</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>org.jboss.tools.jmx.ui.providerUI</code> - provide an icon, id,
displayable name, and wizardPage class for creation of new connections
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <code>org.jboss.tools.jmx.ui.attribute.controls</code> - allows you to
map class types to some Control to present them in the MBean Editor
+ </para>
+ <para>We hope, this guide helped you to get started with the JBoss JMX Tools.
Besides, for additional information you are welcome on <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
forum</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+ <section id="connection" xreflabel="connection">
+
+ <title>Connections Creation Task</title>
+
+ <para>
+ The <property>MBean Explorer</property> 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.
+ </para>
+
+ <para>
+ 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.
+ </para>
- <section>
- <title>Why we should do that?</title>
-
- <para>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.</para>
- </section>
-
- <section>
- <title>Core Extensions</title>
-
- <para>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.</para>
-
- <para>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. </para>
-
- <para>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.</para>
- </section>
-
- <section>
- <title>UI Extensions</title>
- <para>There are two extension points currently approved for use in the
UI</para>
- <itemizedlist>
- <listitem>
- <para>org.jboss.tools.jmx.ui.providerUI - provide an icon, id,
displayable name, and
- wizardPage class for creation of new connections</para>
- </listitem>
- <listitem>
- <para>org.jboss.tools.jmx.ui.attribute.controls - allows you to
map class types to some
- Control to present them in the MBean Editor</para>
- <para>We hope, this guide helped you to get started with the
JBoss JMX Tools. Besides, for additional information you are welcome on <ulink
-
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
forum</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- </section>
- <section id="connection" xreflabel="connection">
-
- <title>Connections Creation Task</title>
-
- <para>The <property>MBean Explorer</property> 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.
</para>
-
- <para>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.
</para>
-
-
- <section><title>Establishing Connection</title>
-
- <para> There are two ways to connect to an application with remote
management enabled:</para>
-
- <para> The first step is the same for both - to connect to a MBean
Server, click the
- <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
bar.</para>
-
- <para>Then to follow the simple one you just need to specify host, port
(and optionally user
- name and password) and click <emphasis>
- <property>OK</property>.</emphasis></para>
- <para>On the <property>Advanced</property> tab you can set
the sever name (it will be displayed in <property>MBean Explorer</property>),
a url to the remote server.
- For example, to connect to JBoss AS you need to set the <property>JMX
URL</property> to
- </para>
- <programlisting role="XML"><![CDATA[
-service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
- ]]></programlisting>
- <para>If it is required you can enter user name and password for the server
connection.
- </para>
-
-
- <note>
- <title>Note</title>
- <para>Only JMX URL based on RMI are supported.</para>
- </note>
- </section>
- </section>
+
+ <section>
+ <title>Establishing Connection</title>
+
+ <para> There are two ways to connect to an application with remote management
enabled:</para>
+
+ <para>
+ The first step is the same for both - to connect to a MBean Server, click the
<guibutton>New Connection</guibutton> icon
<inlinemediaobject><imageobject><imagedata
fileref="images/new_connection_icon.png"/></imageobject></inlinemediaobject>
in the <guilabel>MBean Explorer</guilabel> menu bar.
+ </para>
+
+ <para>
+ Then to follow the simple one you just need to specify host, port (and optionally
user name and password) and click the <guibutton>OK</guibutton> button.
+ </para>
+ <para>
+ On the <guilabel>Advanced</guilabel> tab you can set the sever name (it
will be displayed in <guilabel>MBean Explorer</guilabel>), a URL to the remote
server. For example, to connect to JBoss AS you need to set the <guilabel>JMX
URL</guilabel> to
+ </para>
+ <programlisting
role="XML"><![CDATA[service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector]]></programlisting>
+ <para>If it is required you can enter user name and password for the server
connection. </para>
+ <note>
+ <title>Note</title>
+ <para>Only JMX URL based on RMI are supported.</para>
+ </note>
+ </section>
+ </section>
</chapter>