- JMX in J2EE
- JMX as the Core of Microkernel
- Performance
- Interceptors
- Conclusion
- Resources
JMX as the Core of Microkernel
The MBean server is the central component of the JMX architecture. The MBean server acts as a mediator between the management clients and the MBeans. It's a registry for the MBeans, mapping each MBean object reference to an object name and to a collection of metadata objects that describe the management interface.
The JBoss application server uses the JMX architecture to decouple different services from each other. Each service in the J2EE platform, servlet container, EJB containers, transaction manager, security manager, naming service, messaging service, etc., has an MBean wrapper and is registered to the central MBean server. This design has three consequences:
The MBean server becomes an invocation bus between the separate service implementations. The services can query the MBean server to locate another service they need to invoke. There is no need to include hard references between service implementations, therefore reducing the "hard" dependencies between them. This leads to a more modular server as opposed to a monolithic one.
The application server becomes modular. You can configure the server to start only the servlet and messaging services if that's all your application requires. Alternatively, you may decide that your application has no need for messaging services at all. So rather than use up the system resources to host an unneeded service, you can configure the server (and in this case really the MBean server at the core) to not register the messaging service MBean.
By default, all services become manageable by JMX-compliant management tools. This means that the custom user MBeans deployed to the server will be available for management automatically by generic JMX management tools such as the HTTP adaptors.
In fact, when the JBoss application server starts, it's nothing but an instance of the JMX MBean server. All of the J2EE services are then loaded to the system and registered as MBeans based on the MBean configuration file. What makes this even more interesting is the net-boot option that allows the configuration and corresponding services to be loaded from across the network to the target system. This allows for a centralized configuration of a farm of J2EE servers and helps the system administrators to manage such setups.