First of all, I really like this gents review for anyone interested in JMX....
JMX - Java Management Extensions
http://www.ece.uic.edu/~cpress/jmx/
Let's introduce the new Mustang JConsole features by comparison with the Tiger JConsole MBeans tab look and feel.
http://blogs.sun.com/lmalventosa/entry/changes_to_the_mbeans_tab
Monitoring and Managing JMX Instrumented Applets with JConsole
http://blogs.sun.com/lmalventosa/entry/jmx_instrumented_applets_monitoring_and
JConsole from JDK 6, which has a Plugin API, would allow you to
design your own GUI that appears in one or more tabs inside JConsole.
The advantage is that you do not have to take care of the details of
finding and connecting to the application you want to manage. However, many find JConsole to be of value when working with JDK 6 (even thought it comes with JDK 5) or a combination of JDK 6 and NetBeans. Otherwise, it is not uncommon to find it cumbersome to exploit the full value of the product.
It is important to be aware of what different protocol mechanisms WAS exposes the MBean server through.
http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html#gdejehttp://java.sun.com/javase/6/docs/jdk/api/jconsole/spec/com/sun/tools/jconsole/package-summary.html
Use the Remote tab in JConsole to connect to the Virtual Machine that you want to monitor. Alternatively, use the connect command-line
|option, specifying a host of local host and a port number. When you launch |the application that you want to monitor, set these command-line options:
- -Dcom.sun.management.jmxremote.port=<value> to specify the port the management agent should listen on.
- -Dcom.sun.management.jmxremote.authenticate=false to disable authentication unless you have created a username file.
- -Dcom.sun.management.jmxremote.ssl=false
to disable SSL encryption.
Another option is to use admin client api which are specific to WebSphere built on JMX extns.
From WebSphere tech journal..."The Application
Server administration programming
API is fully documented in the javadoc, which is provided with every
installation (it is located in the web/apidocs directory under
Application Server's root installation directory). The Application Server administration API is based on standard
JMX interfaces and classes, and the JMX javadoc is also provided with
each installation. The com.ibm.websphere.management package contains
the public Application
Server management interface."
If you are trying to programatically create MBeans for your own resources then you have to define MBean interfaces for them. If you want to implement
and/or register your own MBeans, you are venturing into non-application
server-specific territory. In addition to implementing your own MBeans,
you will have to implement your own means of harvesting your metrics and/or managing your resources.
(If Applicable) Note: Data collection for the J2EE Domain
MBean is not available in a IBM
(R) WebSphere
(R) Application Server cluster environment.
http://publib.boulder.ibm.com/infocenter/tivihelp/v3r1/index.jsp?topic=/com.ibm.itcamwas_b.doc_6.1/rev/dc_ws_basic81.htm
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/cjmx_proxymodel.html
Not all WebSphere XD components are exposed via MBeans. Use the
configuration service to manipulate components and artifacts that are
not exposed via Mbeans.
http://www.ibm.com/developerworks/websphere/library/techarticles/0707_lepech/0707_lepech.html
This may or may not be helpful but certainly good to be aware of before any configuration frustration might set in:
Connecting to 'DeploymentManager' is better also because is this
component that works as the 'master agent' in the mbean federation
infrastructure but remember that SOAP is not supported by the JConsole
and AFAIK the preferred ibm's protocol is SOAP. I think you have to try
changing the preferred JMXConnector using WAS's admin console and see
if some service url works.
http://forum.springframework.org/showthread.php?t=38246
http://forum.springframework.org/showthread.php?t=19615&highlight=MBeanExporterMBeanInspector for WebSphere Application Server
A Java Management Extensions (JMX) management browser for WebSphere5.
http://www.alphaworks.ibm.com/tech/mbeaninspector
JMX Scripts with Eclipse Monkey
http://jmesnil.net/weblog/2007/05/23/jmx-scripts-with-eclipse-monkey/There are many use cases where you have to perform theses steps in repetition. It's tedious to do that in a JMX console (
e.g. jconsole or eclipse-jmx) and most of the time, it is not worth writing a Java application.
These use cases beg to be scripted.
We will again use jconsole as our managed java application (see this previous post to start jconsole with all System properties required to manage it remotely).
To run the example:
- install Eclipse Monkey
JMX Console for Eclipse IDE
http://code.google.com/p/eclipse-jmx/
MC4J Supported Servers
IBM WebSphere
5.0, 5.1, 6.0
http://mc4j.org/confluence/display/mc4j/Home
http://manageengine.adventnet.com/products/applications_manager/jmx-console-snmp-console.htmlGood food for thought......
The ObjectGrid JMX and MBean administration model was created to take
advantage of the various JMX consoles that are available for
administering JMX environments. You can put together dashboards using
the JMX console of your choice. Consoles can be attached to the MBeans
running on the management gateway Java virtual machine (JVM) and
dashboards can be assembled using these MBeans. Consoles offer
graphical histories or charts of numerical and string values.
http://www-03.ibm.com/developerworks/wikis/display/objectgridprog/Management+gateway+process+overview
http://www-03.ibm.com/developerworks/wikis/display/objectgridprog/Administering+with+JMX+MBean+interfaces