Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Java Management Extensions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Java technology}} ''' Java Management Extensions''' ('''JMX''') is a [[Java platform|Java]] technology that supplies tools for managing and monitoring [[Application software|application]]s, system objects, devices (such as [[computer printer|printers]]) and service-oriented networks. Those resources are represented by objects called MBeans (for ''[[#Managed beans|Managed Bean]]''). In the API, [[Class (computer science)|class]]es can be dynamically loaded and instantiated. Managing and monitoring applications can be designed and developed using the Java Dynamic Management Kit.<ref>{{cite web |title=Overview of the Java Dynamic Management Kit |url=https://docs.oracle.com/cd/E19698-01/816-7607/6mdjpi6v1/index.html |website=docs.oracle.com |access-date=January 12, 2021}}</ref> JSR 003<ref>[http://www.jcp.org/en/jsr/detail?id=3 JSR 003: JavaTM Management Extensions (JMXTM) Specification]</ref> of the [[Java Community Process]] defined JMX 1.0, 1.1 and 1.2. JMX 2.0 was being developed under JSR 255, but this JSR was subsequently withdrawn.<ref>[http://www.jcp.org/en/jsr/detail?id=255 JSR 255: JavaTM Management Extensions (JMXTM) Specification, version 2.0]</ref> The JMX Remote API 1.0 for remote management and monitoring is specified by JSR 160.<ref>[http://www.jcp.org/en/jsr/detail?id=160 JSR 160: JavaTM Management Extensions (JMX) Remote API]</ref> An extension of the JMX Remote API for Web Services was being developed under JSR 262.<ref> [http://www.jcp.org/en/jsr/detail?id=262 JSR 262: Web Services Connector for Java Management Extensions (JMX) Agents] </ref> Adopted early on by the [[Java Platform, Enterprise Edition|J2EE]] community, JMX has been a part of [[Java Platform, Standard Edition|J2SE]] since version 5.0. "JMX" is a trademark of [[Oracle Corporation]]. == Architecture == [[File:JMX Architecture.svg|thumb|400px|JMX architecture]] JMX uses a three-level architecture: # The ''Probe'' level β also called the ''Instrumentation'' level β contains the probes (called [[#Managed beans|MBeans]]) [[Instrumentation (computer programming)|instrumenting]] the resources # The ''Agent'' level, or MBeanServer β the core of JMX. It acts as an intermediary between the MBean and the applications. # The ''Remote Management'' level enables remote applications to access the MBeanServer through connectors and adaptors. A connector provides full remote access to the MBeanServer API using various communication ([[Java remote method invocation|RMI]], [[IIOP]], [[Java Message Service|JMS]], [[List of web service specifications|WS-*]] β¦), while an adaptor adapts the API to another protocol ([[Simple Network Management Protocol|SNMP]], β¦) or to Web-based GUI ([[HTML]]/[[HTTP]], [[Wireless Markup Language|WML]]/[[HTTP]], β¦). Applications can be generic consoles (such as [[JConsole]]<ref>[http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html Using JConsole to Monitor Applications]</ref> and [[MC4J]]<ref>{{Cite web |url=http://mc4j.org/confluence/display/mc4j/Home |title=The MC4J project creates management software for J2EE application servers and other Java applications. |access-date=2006-08-27 |archive-url=https://web.archive.org/web/20070323111823/http://www.mc4j.org/confluence/display/mc4j/Home |archive-date=2007-03-23 |url-status=dead }}</ref>) or domain-specific (monitoring) applications. External applications can interact with the MBeans through the use of JMX connectors and protocol adapters. Connectors serve to connect an agent with a remote JMX-enabled management application. This form of communication involves a connector in the JMX agent and a connector client in the management application. The [[Java Platform, Standard Edition]] ships with one connector, the '''RMI connector''', which uses the Java Remote Method Protocol that is part of the [[Java remote method invocation]] API. This is the connector which most management applications use. Protocol adapters provide a management view of the JMX agent through a given protocol. Management applications that connect to a protocol adapter are usually specific to the given protocol. == Managed beans == A '''managed bean''' β sometimes simply referred to as an ''MBean'' β is a type of [[JavaBean]], created with [[dependency injection]]. Managed Beans are particularly used in the Java Management Extensions technology β but with Java EE 6 the specification provides for a more detailed meaning of a managed bean. The MBean represents a resource running in the [[Java virtual machine]], such as an application or a Java EE technical service (transactional monitor, JDBC driver, etc.). They can be used for collecting statistics on concerns like performance, resources usage, or problems (pull); for getting and setting application configurations or properties (push/pull); and notifying events like faults or state changes (push). Java EE 6 provides that a managed bean is a bean that is implemented by a Java class, which is called its bean class. A top-level Java class is a managed bean if it is defined to be a managed bean by any other Java EE technology specification (for example, the [[JavaServer Faces]] technology specification), or if it meets all of the following conditions: # It is not a non-static inner class. # It is a concrete class, or is annotated <code>@Decorator</code>. # It is not annotated with an EJB component-defining annotation or declared as an EJB bean class in <code>ejb-jar.xml</code>. No special declaration, such as an annotation, is required to define a managed bean. A MBean can notify the MBeanServer of its internal changes (for the attributes) by implementing the <code>javax.management.NotificationEmitter</code>. The application interested in the MBean's changes registers a listener (<code>javax.management.NotificationListener</code>) to the MBeanServer. Note that JMX does not guarantee that the listeners will receive all notifications.<ref>[http://www.oracle.com/technetwork/java/javase/tech/best-practices-jsp-136021.html Java Management Extensions (JMX) β Best Practices]</ref> ===Types=== There are two basic types of MBean: * ''Standard MBeans'' implement a business interface containing setters and getters for the attributes and the operations (i.e., methods). * ''Dynamic MBeans'' implement the <code>javax.management.DynamicMBean</code> interface that provides a way to list the attributes and operations, and to get and set the attribute values. Additional types are ''Open MBeans'', ''Model MBeans'' and ''Monitor MBeans''. ''Open MBeans'' are dynamic MBeans that rely on the basic data types. They are self-explanatory and more user-friendly. ''Model MBeans'' are dynamic MBeans that can be configured during runtime. A generic MBean class is also provided for dynamically configuring the resources during program runtime. A MXBean (''Platform MBean'') is a special type of MBean that [[Reification (computer science)|reifies]] [[Java virtual machine]] subsystems such as [[garbage collection (computer science)|garbage collection]], [[JIT compilation]], [[memory pools]], [[Thread (computer science)|multi-threading]], etc. A MLet (''Management applet'') is a utility MBean to load, instantiate and register MBeans in a MBeanServer from an [[XML]] description. The format of the XML descriptor is:<ref> {{cite news | url= http://java.sun.com/j2se/1.5.0/docs/api/javax/management/loading/MLet.html | title= MLet (Java 2 Platform SE 5.0) | publisher= [[Sun Microsystems]] | access-date= 2008-06-22 }} </ref> <pre> <MLET CODE = ''class'' | OBJECT = ''serfile'' ARCHIVE = ''archiveList'' [CODEBASE = ''codebaseURL''] [NAME = ''objectName''] [VERSION = ''version''] > [arglist] </MLET> </pre> == Support == JMX is supported at various levels by different vendors: * JMX is supported by Java [[application server]]s such as OpenCloud Rhino Application Server [https://web.archive.org/web/20090719200806/http://www.opencloud.com/products/rhino-application-server/real-time-application-server/], [[JBoss]], JOnAS, [[WebSphere Application Server]], [[WebLogic]], [[SAP NetWeaver Application Server]], [[Oracle Application Server 10g]] and [[Sun Java System Application Server]]. * JMX is supported by the UnboundID Directory Server, Directory Proxy Server, and Synchronization Server.<ref>[https://www.unboundid.com/solutions/enterprise/why-unboundid-for-eds.php UnboundID Corp.] {{webarchive|url=https://web.archive.org/web/20120306163214/http://www.unboundid.com/solutions/enterprise/why-unboundid-for-eds.php |date=2012-03-06 }}</ref> * [[Systems management]] tools that support the protocol include [[Empirix]] OneSight, GroundWork Monitor, [[Hyperic]], [[OpenView|HP OpenView]], [[IBM Director]], ITRS Geneos, [[Nimsoft|Nimsoft NMS]], [[OpenNMS]],<ref>{{Cite web|url=http://www.opennms.org/wiki/Category:JMX|title = Home}}</ref> [[Zabbix]], [[Zenoss Core]], and Zyrion, [[SolarWinds]], [https://www.idera.com/it-infrastructure-management-and-monitoring/application-performance-monitoring-tools?gclid=cih0ji_xum8cfy48gqodagem9q Uptime Infrastructure Monitor], and LogicMonitor.<ref>{{cite web |url=https://www.logicmonitor.com/support/logicmodules/datasources/data-collection-methods/jmx-data-collection/ |title=JMX Data Collection |access-date=2020-11-20 |website=www.logicmonitor.com }}</ref> * JMX is also supported by [[Java Servlet|servlet containers]] such as [[Apache Tomcat]].<ref>[http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html Apache Tomcat 6.0: Monitoring and Managing Tomcat] (Tomcat manual)</ref> & [[Jetty (web server)]] * [[MX4J]] [http://mx4j.sourceforge.net/] is Open Source JMX for Enterprise Computing. * [[jManage]] [http://www.jmanage.org] {{Webarchive|url=https://web.archive.org/web/20200803230223/http://www.jmanage.org/ |date=2020-08-03 }} is an open source enterprise-grade JMX Console with Web and command-line interfaces. * [[MC4J]] [https://web.archive.org/web/20150321180823/http://mc4j.org/] is an open source visual console for connecting to servers supporting JMX * [[snmpAdaptor4j]] [http://snmpadaptor4j.sourceforge.net/] is an open source providing a simple access to MBeans via the SNMP protocol. * [https://github.com/patric-r/jvmtop jvmtop] is a lightweight open source JMX monitoring tool for the command-line * [[Prometheus (software)|Prometheus]] can ingest JMX data via the JMX exporter<ref>{{Cite web|url=https://github.com/prometheus/jmx_exporter|title=JMX Exporter|website=[[GitHub]]|date=14 February 2022}}</ref> which exposes metrics in Prometheus format. * [[New Relic]]'s on-host infrastructure agent collects JMX data<ref>{{Cite web |title=JMX monitoring integration {{!}} New Relic Documentation |url=https://docs.newrelic.com/install/jmx/ |access-date=2025-01-13 |website=docs.newrelic.com}}</ref> which is shown in various charts in its [[Observability (software)|observability]] platform's dashboard.<ref>{{Cite web |title=JVMs page (Java): View app server metrics from JMX {{!}} New Relic Documentation |url=https://docs.newrelic.com/docs/apm/agents/java-agent/features/jvms-page-java-view-app-server-metrics-jmx/ |access-date=2025-01-13 |website=docs.newrelic.com}}</ref><ref>{{Cite web |title=Introduction to New Relic for Java {{!}} New Relic Documentation |url=https://docs.newrelic.com/docs/apm/agents/java-agent/getting-started/introduction-new-relic-java/ |access-date=2025-01-13 |website=docs.newrelic.com}}</ref> * [https://jolokia.org/ Jolokia] is a Java agent that exposes JMX over HTTP for easy access from non-Java systems. == See also == * [[Jini]] * [[Network management]] * [[Simple Network Management Protocol]] == References == <references /> == Further reading == === Articles === * "[http://www.onjava.com/pub/a/onjava/2001/02/01/jmx.html Enabling Component Architectures with JMX]" by Marc Fleury and Juha Lindfors * "[http://www.onjava.com/pub/a/onjava/2002/03/27/jsr77.html Introducing A New Vendor-Neutral J2EE Management API]" by Andreas Schaefer * "Java in the management sphere" by Max Goff 1999 *# [https://www.infoworld.com/article/2076514/java-in-the-management-sphere--part-1.html Oct 20] *# [https://www.infoworld.com/article/2076536/java-in-the-management-sphere--part-2.html Nov 20] *# [https://www.infoworld.com/article/2076552/java-in-the-management-sphere--part-3.html Dec 29] * [http://jboss.org/index.html?module=html&op=userdisplay&id=developers/projects/jboss/jbossmx JMX/JBoss] β The [[microkernel]] design * "[https://www.infoworld.com/article/2071819/manage-your-jmx-enabled-applications-with-jmanage-1-0.html Manage your JMX-enabled applications with jManage 1.0]" by Rakesh Kalra Jan 16, 2006 * "[http://java.sys-con.com/read/37797.htm Managing J2EE Systems with JMX and JUnit] {{Webarchive|url=https://web.archive.org/web/20080526180619/http://java.sys-con.com/read/37797.htm |date=2008-05-26 }}" by Lucas McGregor * [http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html Sun Java Overview of Monitoring and Management] * [http://download.oracle.com/javaee/6/tutorial/doc/gjfzi.html The Java EE 6 Tutorial: About managed beans] === Books === * Benjamin G Sullins, ''Mark B Whipple : JMX in Action: You will also get your first JMX application up and running'', Manning Publications Co. 2002, {{ISBN|1-930110-56-1}} * [[J. Steven Perry]]: ''Java Management Extensions'', O'Reilly, {{ISBN|0-596-00245-9}} * [[Jeff Hanson]]: ''Connecting JMX Clients and Servers: Understanding the Java Management Extensions'', APress L. P., {{ISBN|1-59059-101-1}} * [[Marc Fleury]], [[Juha Lindfors]]: ''JMX: Managing J2EE with Java Management Extensions'', Sams Publishing, {{ISBN|0-672-32288-9}} == External links == * [http://java.sun.com/javase/6/docs/technotes/guides/jmx/JMX_1_4_specification.pdf JMX 1.4] (JMX 1.4, part of Java 6) * [http://www.jboss.org/community/docs/DOC-10941 JMX at JBoss.com] * [http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html JMX on www.oracle.com] * [http://jcp.org/en/jsr/detail?id=255 JSR 255] (JMX 2.0) * [http://jcp.org/en/jsr/detail?id=3 JSR 3] (JMX 1.0, 1.1, and 1.2) {{Java (software platform)}} {{Jakarta EE}} <!-- Categories --> [[Category:Java APIs]] [[Category:Java enterprise platform|Management Extensions]] [[Category:Java specification requests|Management Extensions]] [[Category:Network management]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:ISBN
(
edit
)
Template:Jakarta EE
(
edit
)
Template:Java (software platform)
(
edit
)
Template:Short description
(
edit
)
Template:Webarchive
(
edit
)