To help in the implementation of the ManagedObject part of the
deployers, I've implemeted the MXBean in the mbeans module.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967804#3967804
The MXBean/OpenMBean has some fundamental restrictions where
we should try to go further:
1) OpenType is immutable so it is difficult/impossible to build
recursive types. e.g. class.getSuperClass()
You can't have java.lang.Class as an "attribute" of the
java.lang.Class composite type.
2) OpenType being immutable doesn't support "setters".
OpenTypes can only be set on MXBeans.
3) OpenType/CompositeType access, creates and transfers
across the wire the full graph of the object. There should be
an option for something more lazy for more complicated
and extensions object graphs.
4) OpenType has only limited support for primitives, in
general it works because of reflection, i.e. autoboxing
but there are some examples where it doesn't work,
see the javadoc above for an example.
5) No support for polymorphism.
i.e. You can have a true Object[] or BaseClass[]
because of restrictions on CompositeType "subclassing"
(being fix in the spec) and also SimpleTypes and arrays
are transfered as "raw data".
To support polymorphism, rather than the open data for a string
being a java.lang.String, it would need to be the couple
SimpleData { SimpleType type; // SimpleType.STRING Object data; // java.lang.String }
NOTE: (2) and (3) above would require building a framework
similar to how EJB works or the hibernate attach/detach mechanism
to avoid transporting the full object graph and the opposite problem
of transferring lots small changes.