wangpeng138375 / pojo-mbean

Automatically exported from code.google.com/p/pojo-mbean
0 stars 0 forks source link

Add attribute and operation sort order to @ManagedAttribute and @ManagedOperation #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Default sorting of MBean attributes and operations are alphabetically (String 
comparator order).

We could allow a sort order override attribute to either @ManagedOperation/ 
@ManagedAttribute or to the @Description annotation, since we can only have one 
sort order per attribute, whereas we can have two @ManagedAttribute annotations 
(Read + Write).

Possibly...

@Description(value="This is ordered as x1", order="x1");

Default ordering should still be by operation/attribute name.

TODO: Should ordering be case insensitive?

Original issue reported on code.google.com by morten.h...@gmail.com on 13 Jul 2011 at 10:50

GoogleCodeExporter commented 8 years ago

Original comment by morten.h...@gmail.com on 13 Jul 2011 at 11:52

GoogleCodeExporter commented 8 years ago
I have created a branch r135 and committed code r136 implementing attribute and 
operation sort order, by adding an attribute 
@Description(sortBy="overrideOfEntityName").

However, it seems that the support, at least in jconsole for respecting the 
order of attributes and operations is very inconsistent (see the sample app).

The order is respected in the tree (left pane) for both attributes and 
operations, and in the main window for operations, but not for attributes which 
are sorted alphabetically.

I don't think this feature is worth the effort and increased code complexity, 
so I believe this branch will die at this point. Maybe some day, it'll be 
revived...

Original comment by morten.h...@gmail.com on 13 Jul 2011 at 8:52