Summary
J2SE 5 sports a new set of monitoring and management tools, centered around the java.lang.management package. A recent tutorial shows how to collect vital statistics about an application's performance inside the JVM with MXbeans, or Java platform management beans.
Advertisement
While several vendors included management and monitoring utilities in their earlier JVM distributions, JDK 5 includes a standard set of tools via an implementation of the Java platform management API. A recent IBM DeveloperWorks article describes this API and its associated tools.
Classes in the Java platform management API reside in the java.lang.management package, and correspond to various JVM features, such as garbage collection, the memory subsystem, threads, class loading, and so forth. These capabilities are exposed to the API's user as platform management beans, or MXBeans.
The J2SE 5 SDK includes a graphical utility that takes advantage of MXBeans, JConsole. You can go to the JDK installation's bin subdirectory, and fire up jconsole to obtain a graphical overview of a Java VM's runtime environment.
While platform management beans, and tools such as JConsole, provide an attractive view of what's inside the JVM, many developers use such tools only during performance tuning or performance-related trouble shooting, which often takes place after the main development phase of an application is complete.
To what extent do you think performance-related concerns should play a role during development? What roles, if any, should JVM monitoring and management tools play during the development cycle?