On Mon, Jul 22, 2013 at 1:26 AM, Lukas Krejci <lkrejci@redhat.com> wrote:

This would go into the code, add stuff into the plugin descriptor, make sure your code implements correct interfaces and maybe even stub out the impl of the metric collection for you.

But that is completely different from what I originally had in mind.
My idea was that the users would be able to define a complete plugin by ONLY annotating their Pojos with RHQ-specific annotations. Our annotation processor would then - at compile time - generate necessary glue code and plugin descriptor to turn that bunch of POJOs into a fully functional plugin.

I'm for using annotations to generate the plugin descriptor, and maybe a Maven plugin or Eclipse tool to do this.

I'm really not clear how the agent can 'see' this annotated POJO, when deployed in JBoss (or wherever). Would part of this be to supply the application server with a CDI extension to have the POJO expose itself through JMX or another interface?

I'm advocating that RHQ (and the folk at JBoss) add support for the existing javax.management JMX annotations, though maybe @DescriptorFields is too wordy, and you might introduce something specific for metrics scheduling, and display options.