Author: abogachuk
Date: 2010-05-14 16:02:20 -0400 (Fri, 14 May 2010)
New Revision: 22093
Modified:
trunk/jmx/docs/reference/en-US/tasks.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-49
Managing Equinox chapter is updated and corrected
Modified: trunk/jmx/docs/reference/en-US/tasks.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/tasks.xml 2010-05-14 20:01:00 UTC (rev 22092)
+++ trunk/jmx/docs/reference/en-US/tasks.xml 2010-05-14 20:02:20 UTC (rev 22093)
@@ -1,382 +1,391 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="tasks" xreflabel="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>
-
-
-<para>Like it's 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>
-<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>
-
-</listitem>
-<listitem><para>Start the <property>Main</property> application,
specifying the properties that expose Main for remote management:</para>
-
- <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>
-
-<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
<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>
-
- </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>
- </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'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>Once you have installed the Equinox monitoring framework and
restarted Eclipse:</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>Select <emphasis>
- <property>JMX Server > Open Connection</property>
- </emphasis> and click <emphasis>
- <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>
- </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 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.
- </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>
-
- <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>
-</chapter>
-
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="tasks" xreflabel="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>
+
+
+
+<para>Like it's 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>
+<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>
+
+</listitem>
+<listitem><para>Start the <property>Main</property> application,
specifying the properties that expose Main for remote management:</para>
+
+ <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>
+
+<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
<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>
+
+ </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>
+ </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'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>
+
+ <!--<listitem>
+ <para>Select <emphasis>
+ <property>JMX Server > Open Connection</property>
+ </emphasis> and click <emphasis>
+ <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>
+
+
+ <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 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.
+ </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>
+
+ <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>
+</chapter>
+