jmx-dev Update MXBeans to allow for the possibility that ConstructorProperties is ignored?
Alan Bateman
Alan.Bateman at oracle.com
Tue Jan 15 06:34:30 PST 2013
With the Compact Profiles proposal [1], there will be a subset Profile
of Java SE that has JMX but not java.beans. This creates a challenge for
the MXBean spec where a constructor to reconstitute a type may be used
if it has the java.beans.ConstructorProperties annotation.
For code that is compiled against a compact profile ("javac -profile
compact3" for example) then it's not an issue because using using this
annotation will not compile. However if there is code using this
annotation that is compiled against the full platform but run on a
runtime that implements compact3 then the annotation will be ignored.
I'm wondering whether to add a clarification to the MXBean on this. It
would essentially amount updating the rules under "Reconstructing an
instance of Java type J from a CompositeData" so that it's clear that
rule 2 does apply when running on a subset Profile of Java SE.
I'm looking for opinions on whether this is necessary or not.
-Alan
[1] http://openjdk.java.net/jeps/161
More information about the jmx-dev
mailing list