All software requires the management of computer services and hardware devices. These services are responsible for network connectivity, database support and the hardware devices of the computer. Mbean technology allows java applications a method to manage the resources of a computer within a software application. An MBean is the java virtual representation of a device or resource within a computer. MBeans expose a management interface that enables the manipulations of attributes and functional operations of the resource, which enable real-time monitoring and manipulation of computer processes.
Java is a software programming language that uses an object-oriented design for software development. Within java, each component is considered an object that has specific relevance to real-word concepts, similar to nouns in the English language. A Mbean is a special java object that is a manageable resource or service within an application.
MBeans provide the plumbing to embed custom management code into an application. Multiple functions can be exposed within an application as an MBean. Through the use of MBeans, a system administrator can invoke operations on the applications being monitored, as well as receive notifications about events in the application.
A good example of using Mbeans in practice is through effective resource management. A typical system administrator will monitor the health and well being of a software application by monitoring vital signs, which includes memory, CPU and connections to the servers. By using Mbeans in an application the system administrator can receive alerts when a system begins to approach a memory threshold. This proactive approach to monitoring provides the system administrator adequate time to mitigate issues.
Within java, the java management extension (JMX) enables remote access of the software application by using Mbeans as a technique to manage the available resources. The MBean creates controllable end points of an application, where remote clients can manipulate the inner workings of the software. The use of JMX technology helps system administrators in optimizing and monitoring of enterprise applications.
Mbeans were first introduced in JMX technology with the java 2 platform, standard edition 5.0. Java version 6 includes support for JConsole, which is a monitoring and management console that uses JMX and Mbeans. This tool allows the monitoring of various resources during system run time. It is typically used for detecting symptoms of deadlocks, and memory leaks of an application. As with any Mbean it can connect to a local or remote java application.