|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Eamonn McManus's Blog
JMX Namespaces now available in JDK 7Posted by emcmanus on September 30, 2008 at 03:01 AM | Permalink | Comments (0)The JMX Namespace feature has now been integrated into the JDK 7 platform. You can read about it in detail in the online documentation for javax.management.namespace. Here's my quick summary. Namespaces add a hierarchical structure to the JMX naming scheme. The easiest way to think of this is as a directory hierarchy. Previously JMX MBeans had names like The There are three typical use cases for namespaces. First, if you have more than one MBean Server in the same Java VM (for example, it is an app server, and you have one MBean Server per deployed app), then you can group them all together in a higher-level MBean Server. Second, if you have MBean Servers distributed across different Java VMs (maybe on different machines), then again you can group them together into a "master" MBean Server. Then clients can access the different MBean Servers without having to connect to each one directly. Finally, namespaces support "Virtual MBeans", which do not exist as Java objects except while they are being accessed. There's much more to namespaces than I've described here. Daniel Fuchs is the engineer who did most of the design and implementation work on namespaces, and I expect he will have more to say about them in the near future on his blog. Event Sevice: subscribe to a set of MBeans (registered or non-registered)Posted by emcmanus on September 19, 2008 at 04:16 AM | Permalink | Comments (0)Shanliang Jiang talks about one of the main use cases of the Event Service from the new JMX API in this blog entry. You can use a wildcard ObjectName to subscribe to a set of MBeans. The Event Service tracks the arrival and departure of MBeans, so it will subscribe to new MBeans matching the pattern as they appear. The Event Service is already present in the latest draft of the JDK 7 API and you can try it out by downloading the latest snapshot. Dropping proposed features from the new JMX APIPosted by emcmanus on September 18, 2008 at 08:17 AM | Permalink | Comments (6)Yesterday I cleaned up the umbrella bug that lists the various things we are planning for version 2.0 of the JMX API, which is the version that should be included in Java SE 7. Here's a list of the things we were thinking of doing but are not now planning to. In some of these cases, we realized after discussion in the Expert Group that the proposed feature was either not practical or too hard to nail down. For example, support for persistence would be good. But what would it look like? Would we give you some way to take a snapshot of every MBean? How would that snapshot be represented? How would it be restored? Or would we have a way for an MBean to define its own persistence explicitly? Then what could we usefully define that an MBean can't already do today? In other cases, a reluctant engineering decision was taken because, though the feature would be useful, it would not be useful enough to justify the engineering work to specify it, implement it, and write spec conformance tests for it. Here's the list, with explanations:
None of these decisions is completely irreversible of course. But at this stage I think anyone with a very strong desire to see any of the departed features brought back would need to volunteer to do all the relevant engineering work! JMX Event Service now available in JDK 7 snapshotsPosted by emcmanus on September 01, 2008 at 08:32 AM | Permalink | Comments (0)The new Event Service that is part of version 2.0 of the JMX API is available in the latest snapshot of the JDK 7 platform. The package description for the new The description there starts like this:
As with everything else in the new JMX API, we're always keen on hearing feedback, which you can add as a comment here or send to jmx-spec-comments@sun.com. The principal designer of the new Event Service is Shanliang Jiang, and he'll probably have some interesting things to say about it, which I'll link to from here. Playing with the JMX 2.0 APIPosted by emcmanus on August 06, 2008 at 09:42 AM | Permalink | Comments (5)Version 2.0 of the JMX API is being defined by JSR 255. I've written about some of the features in the new API before. They are trickling into the JDK 7 sources over time, so you can now play with some shiny new things. Here's a description of what they are, and how you can even access them from JDK 6 if you are brave. As you probably know, the JDK 7 platform is being developed in open source, which means that you can see the changes as soon as the JMX team commits them. You can browse the current mainline JDK 7 sources directly from the Mercurial repository, at http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/tip. These sources correspond to the Javadoc snapshot at http://download.java.net/jdk7/docs/api/index.html, and to the JDK 7 snapshot binary at http://download.java.net/jdk7/binaries/. If you download the JDK 7 snapshot binary, you can use it the same way you would use any other JDK installation. Of course, this is work in progress, so don't use it for anything critical. But it tends to be surprisingly stable, and I often use it to run NetBeans, for example. Recent JMX API changes in the JDK 7 sourcesYou can also see all of the changes that have gone into the JDK 7 sources at http://hg.openjdk.java.net/jdk7/jdk7/jdk/shortlog. At the time of writing, one interesting thing you will see there (if you find the JMX API interesting) is this:
Changes that are on the wayFor a project as big and important as the JDK 7 project,
there's a lot of extra engineering that has to happen between
the time the JMX team pushes a change into a publicly-visible
repository and the time that change actually shows up in the
snapshots. I think of the changes as being "in the pipes"
during this time. You can see our changes as soon as we push
them by looking
at http://hg.openjdk.java.net/jdk7/tl/jdk.
(Here, At the time of writing, this will show the change There are two other chunks of functionality that should be showing up in the next couple of months, one big and one somewhat smaller. The big one is namespaces. The smaller one is the stuff that will build on namespaces to support "client contexts" (also described in the slides at that link) and localization of descriptions in MBeanInfo. Once those are in we will be looking at a smallish subset of the various RFEs open against the JMX API. Now would be a good time to agitate for anything you particularly want to see. Using the JMX 2.0 API with the JDK 6 platformUsing the JDK 7 sources, you can in fact build a jar with just the JMX classes and run that with a JDK 6 installation. Of course this is even less supported than running a JDK 7 snapshot, but once again assuming you're not using it for anything critical here's how you would go about it. First download the JDK 7 sources, either using Mercurial if you have it, with a command like this... hg clone http://hg.openjdk.java.net/jdk7/jdk myjdk ...or by downloading the sources from http://download.java.net/jdk7/. The "JDK 7 Source under the JRL license" link on that page is a jar which you download and run using a command like this... java -jar jdk-7-ea-src-b32-jrl-04_aug_2008.jar Now cd to the jdk subdirectory of the sources, if you downloaded the bundle, or into the Mercurial repository you cloned if you did that (you only cloned the jdk subdirectory). Run this command... ant -f make/netbeans/jmx/build.xml If it works, it'll make you a Now you can use your new The second way is to run your programs like this... java -Xbootclasspath/p:/path/to/jmx.jar ... Then only programs that are explicitly run in that way will be using the new JMX implementation. Let us know how you get onIf you play with the new JMX API, or even if you are just browsing through it, we're very interested in hearing about your experiences. Feel free to add your comments here, or send mail to jmx-spec-comments@sun.com, or write a blog entry with tag "jmx". Thanks! |
October 2008
Search this blog:CategoriesCommunity: Java CommunicationsCommunity: Java Enterprise Community: Java Specification Requests Community: Java Tools Community: Java Web Services and XML Community: JDK Community: NetBeans Distributed J2SE JavaOne JSR Open Source Performance Porting Programming Security Tools Web Services and XML Archives
September 2008 Recent EntriesJMX Namespaces now available in JDK 7 Event Sevice: subscribe to a set of MBeans (registered or non-registered) Dropping proposed features from the new JMX API | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|