Skip to Main Content
Java Management Extensions
book

Java Management Extensions

by J. Steven Perry
June 2002
Intermediate to advanced content levelIntermediate to advanced
312 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Java Management Extensions

Other Issues

The JMX monitoring services can be very useful in providing you with an off-the-shelf implementation of a notification broadcaster that is geared for watching attribute values. However, this convenience comes at a price.

First, a monitor can be used to watch only a single attribute of a single MBean. If you would like to monitor multiple resources in your application, you must create a monitor of the appropriate type for every attribute of every MBean you want to monitor.

Second, a monitor must watch the attribute value of an MBean in its own thread of execution, so that, regardless of what the application is doing, the monitor can “spy” on the attribute value and report the results accordingly. Thus, for every monitor, a new thread in the JVM running your application must be created.

Finally, in the JMX 1.0 RI, each time the granularity period elapses and the monitor thread checks the MBean attribute, that thread is replaced with an entirely new thread! This is an odd implementation and can be fairly resource-intensive, depending on which operating system your application runs and how efficiently thread creation and scheduling occurs.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JMX: Managing J2EE with Java™ Management Extensions

JMX: Managing J2EE with Java™ Management Extensions

Juha Lindfors
Java™ and JMX: Building Manageable Systems

Java™ and JMX: Building Manageable Systems

Heather Kreger, Ward Harold, Leigh Williamson

Publisher Resources

ISBN: 0596002459Supplemental ContentCatalog PageErrata