On 9.10.2015 20:50, Mandy Chung wrote:
On 10/09/2015 11:33 AM, Alex Buckley wrote:
On 10/9/2015 1:03 AM, Jaroslav Bachorik wrote:
Well, if anything the @CP annotation is related to
javax.management.openmbean package. All the OpenType and CompositeData
definitions are in this package. @CP annotation is used to influence the
way a CompositeData instance is reconstructed into an instance of the
mapped custom type.

OK, so if ConstructorProperties is more closely related to
CompositeData than to MXBean per se, then put ConstructorProperties
into javax.management.openmbean. The MXBean spec (i.e. the javadoc) is
obviously completely dependent on that package already.


FWIW.  @ConstructorProperties is closely related to MXBean.

MXBean provides an easy way to define and implement your managed mbean
using user-defined types and the MXBean framework converts those types
into the public API and javax.management.openmbean types so that the
client doesn't need the user-defined types to be present.  In other
words, MXBean removes the need to code in javax.management.openmbean.

In ideal world this kind of mapping should be supported by notifications and any other parts dealing with transferring user defined data. And the custom type <-> open type mapping should be completely transparent for the API user. All of this available as an 'open data' module. But we don't live in an ideal world.

I still don't think we should further pollute the 'javax.management' packages - especially if we have API evolution in mind. The argument that it does not make sense to create a new package just for <insert a small number> classes probably got us to this situation when 'javax.management' package contains classes which, in fact, should have been separated into cca. 6 different subpackages (according to their responsibility).

But, since multiple senior reviewers voiced their opinion that this annotation should go to 'javax.management' package I will just buckle down and go with '@javax.management.ConstructorProperties'


-JB-


Mandy

The desire for a new package seems misplaced to me, given how the real
driver for a new package -- the draft JEP for MBean registration --
isn't going anywhere fast.

Alex


Reply via email to