All these capabilities
are part of the core Java platform nowadays, and your application will get the same
benefits just by running on the JVM.
However, JMX also allows you to implement some useful things for your application. We??™ll
take a look at how you can do this, both for the server parts and for the client Rails application.
WHAT IS JMX?
Java applications always need to be controlled and managed in different ways. Usually, the application developer
creates custom code to accomplish this for his or her application, or the framework used provides some
way of handling resources. The problem with this approach is that as soon as you want to use two libraries
together, you have two separate ways to manage these libraries. If you want to connect larger applications
with each other, this situation quickly becomes intractable.
Cue JMX. JMX was defined by JSR 3, one of the first and longest running JSRs. The specification provides
tools for managing and monitoring applications, system objects, resources, devices, service oriented
networks, and almost any kind of system you want to connect it to. The core of JMX is called MBeans, and
can be simple or complicated, depending on your needs.
Application servers have supported JMX since J2EE 1.4, and JMX became part of the Java platform
from version 5.0. If you need this support on earlier versions, you can download libraries to provide it.
181
C H A P T E R 1 0
The support offered by MBeans is divided into different categories: attributes, operations, and notifications.
Pages:
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278