----- Original Message -----
From: "Thomas Segismont" <tsegismo(a)redhat.com>
To: rhq-devel(a)lists.fedorahosted.org
Sent: Tuesday, July 23, 2013 10:01:53 AM
Subject: Re: How about an annotation processor to create "glue code"
and descriptor to convert your code into RHQ
plugin?
Le 22/07/2013 23:10, Elias Ross a écrit :
> 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?
>
The trick is that at runtime, the annotations don't exist anymore. They are only used
at compile time to generate "normal" plugin code that the RHQ then sees and uses
as normal.
> 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.
>
As you know, there is a connected, if somewhat distinct, effort to come up with a common
set of management annotations across JBoss products, where I think the JMX management
annotations (either JMX 1 or 2) will be considered.
https://community.jboss.org/message/828515
I set off to implement the annotation processor (together with a set of annotations) in an
attempt to have a clear set of requirements from the RHQ side that we could then use as
input into the above discussion.
You might have confused two distinct efforts. What Lukas is talking
about is annotated POJO based plugin programming.
If you read Elias' answer in the above mentioned forum thread, you can see that he has
a different use for the annotations, which is interesting, too.
My usecase is a plugin writer that has a bunch of code that talks to the managed resource.
My annotations would enable the plugin writer to more or less keep her POJOs as they are
and create a functional RHQ plugin from them.
Elias' usecase is an application writer that annotates the actual business methods
with annotations that are then exposed via JMX and a sort of plugin generator examines
such JMX metadata and creates an RHQ plugin that talks to JMX.
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel