Please review draft JEP: JMX Specific Annotations for Registration of Managed Resources

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Wed Mar 4 08:47:44 UTC 2015


On 4.3.2015 02:09, Eamonn McManus wrote:
> Could you explain what you mean by this, regarding the annotations
> that were already agreed on by the JSR 255 Expert Group:
>
> * Smaller scope compared to the proposed solution

This is a leftover from the previous proposal which had wider scope than 
what is presented now. Still a few points remain.

- ability to annotate fields turning them into attributes
- ability to provide metadata directly in the annotations, not relying 
solely on inferring them from the annotated element
- missing @ManagedConstructor to expose a constructor
- optional 'service' argument to @ManagedBean annotation which will be 
reflected in the descriptor's 'interfaceClassName' field to provide a 
guidance about the recommended service interface when using 
JMX.newMXBeanProxy()

> * Conceptually in pre JDK7 era

I am afraid this relates more to the implementation - or at least the 
code I was able to reconstruct from the repo history. Shouldn't be 
mentioned here.

>
> I have a number of other comments, but procedurally I'm not sure what
> the precedent is for summarily discarding work previously done in the
> JCP on the same subject. I'd certainly have expected this JEP to start
> from that work, rather than proposing a starting point that isn't even
> correct Java.

Well, this is a draft review. The JSR 255 annotations work is not 
discarded. It is mentioned in the alternatives. The purpose of the open 
review is to find out whether it is ok to continue with proposed 
feature, modify it to use eg. JSR 255 work or abandon it completely.

-JB-

>
> Éamonn McManus, former JSR 255 Spec Lead
>
> 2015-03-03 8:27 GMT-08:00 Jaroslav Bachorik <jaroslav.bachorik at oracle.com>:
>>
>> Hi all,
>>
>> Please review this draft JEP for JMX Specific Annotations for Registration of Managed Resources:
>>
>>       https://bugs.openjdk.java.net/browse/JDK-8044507
>>
>> Background:
>> Current mechanism of defining an MBean requires to provide an MBean interface and its implementation. The interface and the implementation must conform to the strict naming and visibility rules in order for the introspection to be able to bind them.
>>
>> At least the same level of verbosity is required when adding an MBeanInfo to generate MBean metadata.
>>
>> All this leads to a rather verbose code containing a lot of repeating boilerplate parts even for the most simple MBean registrations.
>>
>> This JEP proposes to add a set of annotations for registration and configuration of manageable resources (in other word 'MBeans'). These annotations will be used to generate all the metadata necessary for a resources to be accepted by the current JMX system.
>>
>> Thanks,
>>
>> -JB-



More information about the serviceability-dev mailing list