you can look at the hibernate example - hibernate plugin gets the complex hibernate Statistics object and returns data for an operation. you can look at its metadata and the code to see how they translate the complex object to the Jopr object:
I looked over the Hibernate example and did a rather limited test over here and it worked just fine. But then one thing came to my mind: why not have native support on JMX component for Statistics Objects since they are part of J2EE Management JSR (JSR-77) ?
I think we could extend the property field of the metric tag to have a notation like an array where an Statistics object property would be threated like: Stats[ProcessCpuUsage].
By the way, I am willing to help with this implementation if you guys agree with this new feature...
The JMX component is very generic, its used to also manage/monitor J2SE apps. So it wouldn't be put directly in the jmx plugin.
It would be best to do something along the same lines as the Statistics component does for hibernate, except we would have a JBossJ2EEStatistics component in the jboss plugin. I haven't looked to see what kinds of service resources they would represent.
Or we could maybe put it in a J2EE plugin which extends the JBoss plugin (kinda like what the RHQ Server plugin does).
See what you can come up with and let us know.